๐ Safe Refactoring
Before touching core files, the agent checks dependencies and creates a checkpoint. If tests fail, it rolls back instantly.
statecli_checkpoint() โ edit โ statecli_undo()
Give AI agents the ability to remember, replay, and undo their actions. The infrastructure layer that makes agents self-aware.
npx statecli-mcp-server
Or add to your MCP config:
{
"mcpServers": {
"statecli": {
"command": "npx",
"args": ["-y", "statecli-mcp-server"]
}
}
}
AI agents are powerful but blind. They don't remember what they changed, can't undo mistakes, and have no awareness of their impact. StateCLI fixes this.
"I changed something but don't know what"
statecli_replay(entity)
"I broke something and need to undo"
statecli_undo(entity)
"I want to try something risky"
statecli_checkpoint(entity)
"Will this change break other files?"
statecli_predict_impact(file)
pip install statecli
from statecli import StateCLI, get_statecli_tools
# Direct usage
cli = StateCLI()
cli.checkpoint("project:myapp", "before-refactor")
cli.track("file", "src/index.py", {"action": "modified"})
result = cli.replay("file:src/index.py")
# LangChain integration
from statecli import get_statecli_tools
tools = get_statecli_tools()
agent = initialize_agent(tools, llm)
See how AI agents use StateCLI to code more reliably
Before touching core files, the agent checks dependencies and creates a checkpoint. If tests fail, it rolls back instantly.
statecli_checkpoint() โ edit โ statecli_undo()
When an error occurs, the agent analyzes what changed and automatically suggests or executes a fix.
statecli_analyze_error() โ statecli_auto_recover()
Before renaming a function, the agent predicts which files will break and in what order to update them.
statecli_predict_impact() โ statecli_safe_change_order()
After editing a file, the agent knows exactly which tests to run and tracks pass/fail history.
statecli_test_impact() โ statecli_run_tests()
Install in 30 seconds. No configuration required.
// Add to your mcp_config.json
{
"mcpServers": {
"statecli": {
"command": "npx",
"args": ["-y", "statecli-mcp-server"]
}
}
}