{"id":28089512,"url":"https://github.com/ripred/coder-x","last_synced_at":"2026-02-23T07:05:04.141Z","repository":{"id":288178457,"uuid":"967096847","full_name":"ripred/Coder-X","owner":"ripred","description":"Coder-X: An agentic Python coding assistant with robust CLI, model management, secure config, and full test coverage. Built for extensibility, reliability, and developer productivity.","archived":false,"fork":false,"pushed_at":"2025-04-27T06:39:30.000Z","size":238,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T02:15:19.335Z","etag":null,"topics":["agentic-ai","anthropic","cli","coding-assistant","configuration","developer-tools","llm","model-management","ollama","open-source","prompt-toolkit","pydantic","python","session-history","shell-integration","test-automation","typer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ripred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T23:36:56.000Z","updated_at":"2025-04-27T06:39:34.000Z","dependencies_parsed_at":"2025-04-16T10:49:10.065Z","dependency_job_id":null,"html_url":"https://github.com/ripred/Coder-X","commit_stats":null,"previous_names":["ripred/coder-x"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripred%2FCoder-X","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripred%2FCoder-X/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripred%2FCoder-X/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripred%2FCoder-X/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ripred","download_url":"https://codeload.github.com/ripred/Coder-X/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948407,"owners_count":21988953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","anthropic","cli","coding-assistant","configuration","developer-tools","llm","model-management","ollama","open-source","prompt-toolkit","pydantic","python","session-history","shell-integration","test-automation","typer"],"created_at":"2025-05-13T12:59:19.664Z","updated_at":"2026-02-23T07:05:04.114Z","avatar_url":"https://github.com/ripred.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coder-X Python Agentic Coding Assistant\n\n**Project Status (as of 2025-04-16):**\n- All core features implemented, tested, and documented\n- All tests pass (pytest, 159 tests)\n- Code coverage: 81% (see plan.md for details)\n- SessionHistory, config, and file operations are robust and fully covered by tests\n- Documentation is up to date in plan.md and architecture_and_maintenance.md\n- No outstanding bugs or failing tests\n\nA Python Agentic Coding Assistant with CLI, supporting configuration management, model management, and secure shell/file operations.\n\n## Workflow Discipline\n\nThis project adheres to a strict workflow discipline to ensure maintainability, reliability, and quality:\n\n* Always keep documentation up to date with the latest changes and features.\n* Always require and run tests for every change, no matter how small.\n* Always commit and push changes after all tests have passed.\n\n## Features\n- CLI and interactive shell (Typer-based)\n- Powerful configuration management (CLI, prompts, and config files)\n- Model management (local and remote, flexible storage path selection)\n- Secure shell and file operations with full audit trail\n- User and session management with export and clear history\n- Secure CLI/API key encryption and storage\n- Third-party integrations (e.g., GitHub, Ollama, etc.) with token management\n- YAML and JSON config support\n- MCP server integration for advanced workflows\n- Automated testing and high code coverage discipline\n- Extensible plugin and integration architecture\n\n## Quickstart\n\n1. **Install dependencies:**\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n2. **Run the Coder-X CLI:**\n   ```sh\n   python app/main.py\n   ```\n\n3. **Use the CLI:**\n   ```sh\n   python app/test_cli_new.py --help\n   ```\n\n## Testing\n\nRun all tests:\n```sh\npytest\n```\n\n## Project Structure\n- `app/` — Main application code\n- `tests/` — Tests for all modules\n- `plan.md` — Project plan and progress\n- `architecture_and_maintenance.md` — System architecture and maintenance docs\n\n## Configuration\n- Config is stored in JSON (default: `~/.coder_x_config.json`), validated and managed via a Pydantic V2 schema for safety and extensibility.\n- Model storage path defaults to `~/.coder_x_models`\n- All config options can be managed via robust CLI commands (`show`, `set`, `unset`, `setup`), with all output as structured JSON for scripting and testability.\n- Comprehensive tests ensure config reliability and future extensibility.\n\n## Model Management\n- List, select, load, and unload models via CLI\n- Dynamic loading/unloading of local LLMs using Ollama backend:\n  - `coder-x model load \u003cmodel_name\u003e` to download/pull a model\n  - `coder-x model unload \u003cmodel_name\u003e` to remove a model\n- Model storage volume can be listed and set at runtime:\n  - `coder-x model volumes` to list candidate storage locations\n  - `coder-x model set-volume \u003cpath\u003e` to set Ollama model storage directory\n- See `architecture_and_maintenance.md` for backend and config details\n\n## Environment Variables\n\n| Variable                  | Default                             | Description                                      |\n|---------------------------|-------------------------------------|--------------------------------------------------|\n| `CODER_X_CONFIG`          | `~/.coder_x_config.json`            | Path to the main JSON config file                |\n| `CODER_X_YAML_CONFIG`     | `~/.coder_x_config.yaml`            | Path to YAML config file (if used)               |\n| `HOME`                    | System user home                    | Used for default config/model/history locations   |\n| `PYTHONPATH`              | (set by tests)                      | Ensures correct module/package import            |\n| `CODER_X_CONFIG`          | `~/.coder_x_config.json`            | Path to JSON config file                         |\n| `CODER_X_HISTORY`         | `~/.coder_x_history.json`           | Path to session history file                     |\n| `CODER_X_KEY`             | `~/.coder_x_key.enc`                | Encrypted CLI/API key file (see below).         |\n| `OLLAMA_MODELS_CMD`       | `ollama list`                       | Command to list Ollama models (if used)          |\n\n### Encrypted CLI/API Key Storage\n\nCoder-X now supports secure encryption of CLI/API keys using industry-standard cryptography:\n- **Encryption:** Uses PBKDF2HMAC key derivation and Fernet (AES) authenticated encryption.\n- **Storage:** Encrypted secrets are stored in a binary file (default: `~/.coder_x_key.enc`).\n- **Passphrase:** You must provide a passphrase (recommended: via environment variable or prompt) to encrypt/decrypt your secret.\n\n**How to Use:**\n- To save a new key: use the CLI or call `encrypt_secret()` from `app/key_encryption.py`, then store the resulting salt and token.\n- To load a key: use `load_encrypted_secret()` and `decrypt_secret()` with your passphrase.\n\n**Security Notes:**\n- Your key is never stored in plain text.\n- If you lose your passphrase, the encrypted key cannot be recovered—you must generate a new one.\n- See `app/key_encryption.py` for code and usage examples.\n\n*Most environment variables are optional; defaults are used if unset.*\n\n---\n\nFor more, see `plan.md` and `architecture_and_maintenance.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripred%2Fcoder-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fripred%2Fcoder-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripred%2Fcoder-x/lists"}