|
| 1 | +# ExternKit |
| 2 | + |
| 3 | +A comprehensive project management toolkit written in Rust with Python integration. ExternKit provides command-line utilities for environment variable management, text editing, and Python tooling. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Environment Variable Management**: Add, update, and delete environment variables |
| 8 | +- **Built-in Text Editor**: Nano-like terminal text editor with syntax highlighting |
| 9 | +- **Python Integration**: Python extension module and pip management tools |
| 10 | +- **Cross-platform**: Available for Windows and Linux |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +### Pre-built Binaries |
| 15 | + |
| 16 | +Download the latest release for your platform: |
| 17 | +- **Linux**: `externkit-linux-x86_64.tar.gz` |
| 18 | +- **Windows**: `externkit-windows-x86_64.exe.zip` |
| 19 | + |
| 20 | +### From Source |
| 21 | + |
| 22 | +```bash |
| 23 | +git clone https://github.com/externref/externkit.git |
| 24 | +cd externkit |
| 25 | +cargo build --release |
| 26 | +``` |
| 27 | + |
| 28 | +### Python Package |
| 29 | + |
| 30 | +```bash |
| 31 | +pip install externkit |
| 32 | +``` |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +### Initialize Project |
| 37 | + |
| 38 | +```bash |
| 39 | +externkit init |
| 40 | +``` |
| 41 | + |
| 42 | +### Environment Variable Management |
| 43 | + |
| 44 | +```bash |
| 45 | +# Add an environment variable |
| 46 | +externkit env add MY_VAR "my_value" |
| 47 | + |
| 48 | +# Update an environment variable |
| 49 | +externkit env update MY_VAR "new_value" |
| 50 | + |
| 51 | +# Delete an environment variable |
| 52 | +externkit env delete MY_VAR |
| 53 | +``` |
| 54 | + |
| 55 | +### Text Editor |
| 56 | + |
| 57 | +Launch the built-in nano-like text editor: |
| 58 | + |
| 59 | +```bash |
| 60 | +# Create or edit a file |
| 61 | +externkit edit myfile.txt |
| 62 | + |
| 63 | +# Start with a new file |
| 64 | +externkit edit |
| 65 | +``` |
| 66 | + |
| 67 | +#### Editor Shortcuts |
| 68 | + |
| 69 | +- **Ctrl+S**: Save file |
| 70 | +- **Ctrl+Q**: Quit editor |
| 71 | +- **Ctrl+O**: Open file |
| 72 | +- **Arrow Keys**: Navigate cursor |
| 73 | +- **Backspace**: Delete character |
| 74 | +- **Delete**: Delete character forward |
| 75 | +- **Enter**: Insert new line |
| 76 | + |
| 77 | +### Python Tools |
| 78 | + |
| 79 | +```bash |
| 80 | +# Install pip for a specific Python executable |
| 81 | +externkit get_pip --python-path /usr/bin/python3 |
| 82 | +``` |
| 83 | + |
| 84 | +## Python Integration |
| 85 | + |
| 86 | +ExternKit can also be used as a Python module: |
| 87 | + |
| 88 | +```python |
| 89 | +import externkit |
| 90 | + |
| 91 | +# Use externkit functions from Python |
| 92 | +``` |
| 93 | + |
| 94 | +## Development |
| 95 | + |
| 96 | +### Prerequisites |
| 97 | + |
| 98 | +- Rust 1.70+ |
| 99 | +- Python 3.8+ |
| 100 | +- Cargo |
| 101 | + |
| 102 | +### Building |
| 103 | + |
| 104 | +```bash |
| 105 | +# Build the Rust binary |
| 106 | +cargo build --release |
| 107 | + |
| 108 | +# Build the Python extension |
| 109 | +pip install maturin |
| 110 | +maturin develop |
| 111 | +``` |
| 112 | + |
| 113 | +### Running Tests |
| 114 | + |
| 115 | +```bash |
| 116 | +cargo test |
| 117 | +``` |
| 118 | + |
| 119 | +## Project Structure |
| 120 | + |
| 121 | +``` |
| 122 | +externkit/ |
| 123 | +├── src/ |
| 124 | +│ ├── main.rs # CLI entry point |
| 125 | +│ ├── lib.rs # Python extension entry point |
| 126 | +│ ├── backend/ # Core functionality |
| 127 | +│ │ ├── env.rs # Environment variable management |
| 128 | +│ │ ├── python_tools.rs # Python tooling |
| 129 | +│ │ └── utils.rs # Utility functions |
| 130 | +│ └── editor/ # Text editor implementation |
| 131 | +│ ├── editor.rs # Core editor logic |
| 132 | +│ ├── input.rs # Input handling |
| 133 | +│ └── display.rs # Display rendering |
| 134 | +├── Cargo.toml # Rust dependencies |
| 135 | +├── pyproject.toml # Python package configuration |
| 136 | +└── README.md |
| 137 | +``` |
| 138 | + |
| 139 | +## CI/CD |
| 140 | + |
| 141 | +The project includes GitHub Actions workflows for: |
| 142 | +- **Build**: Cross-platform binary builds for Linux and Windows |
| 143 | +- **Publish**: Automated PyPI publishing with trusted publishing |
| 144 | + |
| 145 | +## Contributing |
| 146 | + |
| 147 | +1. Fork the repository |
| 148 | +2. Create a feature branch |
| 149 | +3. Make your changes |
| 150 | +4. Add tests if applicable |
| 151 | +5. Submit a pull request |
| 152 | + |
| 153 | +## License |
| 154 | + |
| 155 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 156 | + |
| 157 | +## Author |
| 158 | + |
| 159 | +**externref** - [GitHub](https://github.com/externref) |
| 160 | + |
| 161 | +--- |
| 162 | + |
| 163 | +*ExternKit - Your all-in-one project management toolkit* |
0 commit comments