smartedit is a small CLI for language-aware code exploration and compact source edits.
It is built primarily for AI-agent workflows: inspect code structure without reading full files, identify narrow edit targets, and apply small deterministic changes with less token usage than whole-file reads and rewrites. It is also useful for humans who want scriptable, narrow edits.
smartedit currently centers on three capabilities:
smartedit ast-print for fast structural exploration of Rust, Python, JavaScript, TypeScript, and Gosmartedit apply for compact line-, text-, and file-oriented editssmartedit install-skill for installing the bundled agent skillFor command syntax and detailed manual usage, see docs/ast-print.md, docs/text-format.md, skill/SKILL.md, and smartedit --help.
Use smartedit when an agent or operator should:
--locInstall from a checkout:
cargo install --path .
Install directly from Git:
cargo install --git https://github.com/theduke/smartedit --locked smartedit-cli
Install the default package from the flake:
nix profile install github:theduke/smartedit
Run it without installing:
nix run github:theduke/smartedit
The repo ships a bundled smartedit skill for agent environments that support .agents/skills.
Install it for the current repository:
smartedit install-skill --repo
Install it into a specific directory:
smartedit install-skill --dir path/to/project
Install it for your user home:
smartedit install-skill --user
This writes SKILL.md to .agents/skills/smartedit under the chosen root.
The intended loop is:
smartedit ast-print to get structure, signatures, docs, or exact locations.smartedit apply with an inline edit program or .smedit file.Typical agent scenarios:
--loc, then replaces only that function body.smartedit first and fall back only when needed.GitHub Actions uses release-plz via .github/workflows/release-plz.yml.
Published CLI releases then trigger .github/workflows/release-binaries.yml to build and attach smartedit binaries for Linux, Windows, and macOS.
main, it opens or updates a release PR with version/changelog changes.CARGO_REGISTRY_TOKEN is configured in repository secrets, it also runs publish/release.RELEASE_PLZ_TOKEN must remain a PAT instead of the default GITHUB_TOKEN.17 commits
Rust
87.0%
Python
12.2%
smartedit is a small CLI for language-aware code exploration and compact source edits.
It is built primarily for AI-agent workflows: inspect code structure without reading full files, identify narrow edit targets, and apply small deterministic changes with less token usage than whole-file reads and rewrites. It is also useful for humans who want scriptable, narrow edits.
smartedit currently centers on three capabilities:
smartedit ast-print for fast structural exploration of Rust, Python, JavaScript, TypeScript, and Gosmartedit apply for compact line-, text-, and file-oriented editssmartedit install-skill for installing the bundled agent skillFor command syntax and detailed manual usage, see docs/ast-print.md, docs/text-format.md, skill/SKILL.md, and smartedit --help.
Use smartedit when an agent or operator should:
--locInstall from a checkout:
cargo install --path .
Install directly from Git:
cargo install --git https://github.com/theduke/smartedit --locked smartedit-cli
Install the default package from the flake:
nix profile install github:theduke/smartedit
Run it without installing:
nix run github:theduke/smartedit
The repo ships a bundled smartedit skill for agent environments that support .agents/skills.
Install it for the current repository:
smartedit install-skill --repo
Install it into a specific directory:
smartedit install-skill --dir path/to/project
Install it for your user home:
smartedit install-skill --user
This writes SKILL.md to .agents/skills/smartedit under the chosen root.
The intended loop is:
smartedit ast-print to get structure, signatures, docs, or exact locations.smartedit apply with an inline edit program or .smedit file.Typical agent scenarios:
--loc, then replaces only that function body.smartedit first and fall back only when needed.GitHub Actions uses release-plz via .github/workflows/release-plz.yml.
Published CLI releases then trigger .github/workflows/release-binaries.yml to build and attach smartedit binaries for Linux, Windows, and macOS.
main, it opens or updates a release PR with version/changelog changes.CARGO_REGISTRY_TOKEN is configured in repository secrets, it also runs publish/release.RELEASE_PLZ_TOKEN must remain a PAT instead of the default GITHUB_TOKEN.17 commits
Rust
87.0%
Python
12.2%