samcode-cli 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- samcode_cli-1.0.2/PKG-INFO +123 -0
- samcode_cli-1.0.2/README.md +106 -0
- samcode_cli-1.0.2/samcode.py +1041 -0
- samcode_cli-1.0.2/samcode_cli.egg-info/PKG-INFO +123 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.2}/samcode_cli.egg-info/SOURCES.txt +1 -0
- samcode_cli-1.0.2/setup.py +27 -0
- samcode_cli-1.0.0/PKG-INFO +0 -13
- samcode_cli-1.0.0/README.md +0 -194
- samcode_cli-1.0.0/samcode_cli.egg-info/PKG-INFO +0 -13
- samcode_cli-1.0.0/setup.py +0 -22
- {samcode_cli-1.0.0 → samcode_cli-1.0.2}/samcode_cli.egg-info/dependency_links.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.2}/samcode_cli.egg-info/entry_points.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.2}/samcode_cli.egg-info/requires.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.2}/samcode_cli.egg-info/top_level.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.2}/setup.cfg +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: samcode-cli
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: An autonomous AI coding agent that runs in your terminal.
|
|
5
|
+
Author: Magra Houssem Eddine
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: rich
|
|
8
|
+
Requires-Dist: questionary
|
|
9
|
+
Requires-Dist: prompt_toolkit
|
|
10
|
+
Requires-Dist: requests
|
|
11
|
+
Requires-Dist: beautifulsoup4
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: description
|
|
14
|
+
Dynamic: description-content-type
|
|
15
|
+
Dynamic: requires-dist
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# SamCode CLI
|
|
20
|
+
|
|
21
|
+
[](https://pypi.org/project/samcode-cli/)
|
|
22
|
+
[](https://pypi.org/project/samcode-cli/)
|
|
23
|
+
[](https://opensource.org/licenses/MIT)
|
|
24
|
+
|
|
25
|
+
**SamCode CLI** is a powerful, autonomous AI coding agent that runs directly in your terminal. Similar to Claude Code and GitHub Copilot Workspace, it reads your project structure, writes and edits code, executes terminal commands, and fixes its own errors—all while keeping your workflow secure and efficient.
|
|
26
|
+
|
|
27
|
+
## ✨ Key Features
|
|
28
|
+
|
|
29
|
+
- 🤖 **Autonomous Agentic Loop**: The agent thinks in steps. It reads files, writes code, runs commands, and automatically fixes terminal errors or reviews its own code for bugs.
|
|
30
|
+
- 🌐 **Universal AI Support**: Connect to 15+ providers (OpenAI, Anthropic, Google Gemini, Ollama, Groq, etc.) with dynamic model fetching.
|
|
31
|
+
- 📄 **Universal Document Reader**: Upload and analyze PDFs, Word docs, Excel sheets, PowerPoint presentations, and images directly in the chat.
|
|
32
|
+
- 🔍 **Live Web Search**: Use `/searchweb` to open your browser and let the AI synthesize answers from live search results.
|
|
33
|
+
- **Project Scaffolding**: Use `/init` to instantly scaffold projects for React, Next.js, Django, Spring Boot, Flutter, Rust, and more.
|
|
34
|
+
- 🌿 **Native Git Integration**: A full interactive Git workflow (`/git`) to commit, push, pull, branch, and stash without leaving the agent.
|
|
35
|
+
- 📦 **Auto Dependency Installation**: Automatically detects missing packages and installs them with your approval.
|
|
36
|
+
- 🔒 **Path Sandboxing**: The agent is restricted to your workspace and asks for explicit permission before accessing files outside the current directory.
|
|
37
|
+
- ⌨️ **Advanced Shortcuts**: Emacs-style navigation (Ctrl+A, Ctrl+W, Home/End) in the prompt for fast typing.
|
|
38
|
+
- **Caveman Mode**: Save tokens with ultra-concise, grunt-like AI responses.
|
|
39
|
+
|
|
40
|
+
## 🚀 Installation
|
|
41
|
+
|
|
42
|
+
Install SamCode CLI globally from PyPI using pip:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install samcode-cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Commands Reference
|
|
49
|
+
|
|
50
|
+
### 🤖 Core & AI
|
|
51
|
+
|
|
52
|
+
| **Command** | **Description** |
|
|
53
|
+
| ----------------- | ------------------------------------------------------------------- |
|
|
54
|
+
| `/connect` | **Configure AI provider and API key interactively.** |
|
|
55
|
+
| `/models` | **Dynamically fetch and select models from your provider.** |
|
|
56
|
+
| `/caveman` | **Cycle through token-saving modes (OFF ➔ BASIC ➔ ULTRA).** |
|
|
57
|
+
| `/deps` | **Toggle auto-approve for dependency installations.** |
|
|
58
|
+
| `/aboutme` | **Information about the developer and SamCode.** |
|
|
59
|
+
|
|
60
|
+
### 📂 Files & Documents
|
|
61
|
+
|
|
62
|
+
| **Command** | **Description** |
|
|
63
|
+
| --------------------- | --------------------------------------------------------------------- |
|
|
64
|
+
| `/upload <path>` | **Upload & extract documents (PDF, DOCX, XLSX, PPTX, Images).** |
|
|
65
|
+
| `/clear-uploads` | **Clear uploaded documents from the session context.** |
|
|
66
|
+
| `/read-file <path>` | **Read any file using the universal document reader.** |
|
|
67
|
+
|
|
68
|
+
### 🌐 Web & Scaffolding
|
|
69
|
+
|
|
70
|
+
| **Command** | **Description** |
|
|
71
|
+
| ---------------------- | ------------------------------------------------------------------------ |
|
|
72
|
+
| `/searchweb <query>` | **Search the web (opens browser) & get an AI-synthesized answer.** |
|
|
73
|
+
| `/init <name>` | **Scaffold a new project (React, Django, Spring, Flutter, etc.).** |
|
|
74
|
+
|
|
75
|
+
### 🌿 Git Operations
|
|
76
|
+
|
|
77
|
+
| **Command** | **Description** |
|
|
78
|
+
| ----------------- | -------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `/git` | **Open the interactive Git menu (Status, Commit, Push, Pull, Branches, Diff, Stash).** |
|
|
80
|
+
|
|
81
|
+
### ⚙️ System
|
|
82
|
+
|
|
83
|
+
| **Command** | **Description** |
|
|
84
|
+
| ----------------- | -------------------------------------- |
|
|
85
|
+
| `/help` | **Show all available commands.** |
|
|
86
|
+
| `/clear` | **Clear the terminal screen.** |
|
|
87
|
+
| `/exit` | **Exit SamCode CLI.** |
|
|
88
|
+
|
|
89
|
+
## ⌨️ Keyboard Shortcuts
|
|
90
|
+
|
|
91
|
+
**SamCode CLI uses **`prompt_toolkit` to provide a rich input experience. The following shortcuts work directly in the prompt:
|
|
92
|
+
|
|
93
|
+
* **Ctrl + A** **: Select all text**
|
|
94
|
+
* **Ctrl + W** **: Delete word backward**
|
|
95
|
+
* **Ctrl + U** **: Clear line backward**
|
|
96
|
+
* **Ctrl + K** **: Delete to end of line**
|
|
97
|
+
* **Home / End** **: Jump to start/end of line**
|
|
98
|
+
* **Shift + Home/End** **: Select to start/end of line**
|
|
99
|
+
* **Ctrl + Left/Right** **: Jump by word**
|
|
100
|
+
|
|
101
|
+
## 🛡️ Safety & Security
|
|
102
|
+
|
|
103
|
+
* **Path Sandboxing** **: By default, the agent cannot read, write, or execute commands outside the directory where you launched **`samcode`. If it needs to, it will pause and ask for your explicit permission.
|
|
104
|
+
* **User Approval** **: All file modifications, terminal commands, and dependency installations require your confirmation before execution (unless auto-approve is enabled via **`/deps`).
|
|
105
|
+
* **Self-Review** **: After writing code, the agent automatically reviews its own work to catch syntax errors or logical bugs before moving on.**
|
|
106
|
+
|
|
107
|
+
## Requirements
|
|
108
|
+
|
|
109
|
+
* **Python 3.8 or higher**
|
|
110
|
+
* **An API key for your chosen AI provider (OpenAI, Anthropic, Google, etc.)**
|
|
111
|
+
* **Internet connection (except when using local Ollama models)**
|
|
112
|
+
|
|
113
|
+
## 📝 License
|
|
114
|
+
|
|
115
|
+
**This project is licensed under the MIT License. See the **[LICENSE]() file for details.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
*Developed by Magra Houssem Eddine*
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
# SamCode CLI
|
|
3
|
+
|
|
4
|
+
[](https://pypi.org/project/samcode-cli/)
|
|
5
|
+
[](https://pypi.org/project/samcode-cli/)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
**SamCode CLI** is a powerful, autonomous AI coding agent that runs directly in your terminal. Similar to Claude Code and GitHub Copilot Workspace, it reads your project structure, writes and edits code, executes terminal commands, and fixes its own errors—all while keeping your workflow secure and efficient.
|
|
9
|
+
|
|
10
|
+
## ✨ Key Features
|
|
11
|
+
|
|
12
|
+
- 🤖 **Autonomous Agentic Loop**: The agent thinks in steps. It reads files, writes code, runs commands, and automatically fixes terminal errors or reviews its own code for bugs.
|
|
13
|
+
- 🌐 **Universal AI Support**: Connect to 15+ providers (OpenAI, Anthropic, Google Gemini, Ollama, Groq, etc.) with dynamic model fetching.
|
|
14
|
+
- 📄 **Universal Document Reader**: Upload and analyze PDFs, Word docs, Excel sheets, PowerPoint presentations, and images directly in the chat.
|
|
15
|
+
- 🔍 **Live Web Search**: Use `/searchweb` to open your browser and let the AI synthesize answers from live search results.
|
|
16
|
+
- **Project Scaffolding**: Use `/init` to instantly scaffold projects for React, Next.js, Django, Spring Boot, Flutter, Rust, and more.
|
|
17
|
+
- 🌿 **Native Git Integration**: A full interactive Git workflow (`/git`) to commit, push, pull, branch, and stash without leaving the agent.
|
|
18
|
+
- 📦 **Auto Dependency Installation**: Automatically detects missing packages and installs them with your approval.
|
|
19
|
+
- 🔒 **Path Sandboxing**: The agent is restricted to your workspace and asks for explicit permission before accessing files outside the current directory.
|
|
20
|
+
- ⌨️ **Advanced Shortcuts**: Emacs-style navigation (Ctrl+A, Ctrl+W, Home/End) in the prompt for fast typing.
|
|
21
|
+
- **Caveman Mode**: Save tokens with ultra-concise, grunt-like AI responses.
|
|
22
|
+
|
|
23
|
+
## 🚀 Installation
|
|
24
|
+
|
|
25
|
+
Install SamCode CLI globally from PyPI using pip:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install samcode-cli
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Commands Reference
|
|
32
|
+
|
|
33
|
+
### 🤖 Core & AI
|
|
34
|
+
|
|
35
|
+
| **Command** | **Description** |
|
|
36
|
+
| ----------------- | ------------------------------------------------------------------- |
|
|
37
|
+
| `/connect` | **Configure AI provider and API key interactively.** |
|
|
38
|
+
| `/models` | **Dynamically fetch and select models from your provider.** |
|
|
39
|
+
| `/caveman` | **Cycle through token-saving modes (OFF ➔ BASIC ➔ ULTRA).** |
|
|
40
|
+
| `/deps` | **Toggle auto-approve for dependency installations.** |
|
|
41
|
+
| `/aboutme` | **Information about the developer and SamCode.** |
|
|
42
|
+
|
|
43
|
+
### 📂 Files & Documents
|
|
44
|
+
|
|
45
|
+
| **Command** | **Description** |
|
|
46
|
+
| --------------------- | --------------------------------------------------------------------- |
|
|
47
|
+
| `/upload <path>` | **Upload & extract documents (PDF, DOCX, XLSX, PPTX, Images).** |
|
|
48
|
+
| `/clear-uploads` | **Clear uploaded documents from the session context.** |
|
|
49
|
+
| `/read-file <path>` | **Read any file using the universal document reader.** |
|
|
50
|
+
|
|
51
|
+
### 🌐 Web & Scaffolding
|
|
52
|
+
|
|
53
|
+
| **Command** | **Description** |
|
|
54
|
+
| ---------------------- | ------------------------------------------------------------------------ |
|
|
55
|
+
| `/searchweb <query>` | **Search the web (opens browser) & get an AI-synthesized answer.** |
|
|
56
|
+
| `/init <name>` | **Scaffold a new project (React, Django, Spring, Flutter, etc.).** |
|
|
57
|
+
|
|
58
|
+
### 🌿 Git Operations
|
|
59
|
+
|
|
60
|
+
| **Command** | **Description** |
|
|
61
|
+
| ----------------- | -------------------------------------------------------------------------------------------- |
|
|
62
|
+
| `/git` | **Open the interactive Git menu (Status, Commit, Push, Pull, Branches, Diff, Stash).** |
|
|
63
|
+
|
|
64
|
+
### ⚙️ System
|
|
65
|
+
|
|
66
|
+
| **Command** | **Description** |
|
|
67
|
+
| ----------------- | -------------------------------------- |
|
|
68
|
+
| `/help` | **Show all available commands.** |
|
|
69
|
+
| `/clear` | **Clear the terminal screen.** |
|
|
70
|
+
| `/exit` | **Exit SamCode CLI.** |
|
|
71
|
+
|
|
72
|
+
## ⌨️ Keyboard Shortcuts
|
|
73
|
+
|
|
74
|
+
**SamCode CLI uses **`prompt_toolkit` to provide a rich input experience. The following shortcuts work directly in the prompt:
|
|
75
|
+
|
|
76
|
+
* **Ctrl + A** **: Select all text**
|
|
77
|
+
* **Ctrl + W** **: Delete word backward**
|
|
78
|
+
* **Ctrl + U** **: Clear line backward**
|
|
79
|
+
* **Ctrl + K** **: Delete to end of line**
|
|
80
|
+
* **Home / End** **: Jump to start/end of line**
|
|
81
|
+
* **Shift + Home/End** **: Select to start/end of line**
|
|
82
|
+
* **Ctrl + Left/Right** **: Jump by word**
|
|
83
|
+
|
|
84
|
+
## 🛡️ Safety & Security
|
|
85
|
+
|
|
86
|
+
* **Path Sandboxing** **: By default, the agent cannot read, write, or execute commands outside the directory where you launched **`samcode`. If it needs to, it will pause and ask for your explicit permission.
|
|
87
|
+
* **User Approval** **: All file modifications, terminal commands, and dependency installations require your confirmation before execution (unless auto-approve is enabled via **`/deps`).
|
|
88
|
+
* **Self-Review** **: After writing code, the agent automatically reviews its own work to catch syntax errors or logical bugs before moving on.**
|
|
89
|
+
|
|
90
|
+
## Requirements
|
|
91
|
+
|
|
92
|
+
* **Python 3.8 or higher**
|
|
93
|
+
* **An API key for your chosen AI provider (OpenAI, Anthropic, Google, etc.)**
|
|
94
|
+
* **Internet connection (except when using local Ollama models)**
|
|
95
|
+
|
|
96
|
+
## 📝 License
|
|
97
|
+
|
|
98
|
+
**This project is licensed under the MIT License. See the **[LICENSE]() file for details.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
*Developed by Magra Houssem Eddine*
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```
|