samcode-cli 1.0.0__tar.gz → 1.0.1__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.1/PKG-INFO +123 -0
- samcode_cli-1.0.1/README.md +106 -0
- samcode_cli-1.0.1/samcode_cli.egg-info/PKG-INFO +123 -0
- samcode_cli-1.0.1/setup.py +28 -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.1}/samcode_cli.egg-info/SOURCES.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.1}/samcode_cli.egg-info/dependency_links.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.1}/samcode_cli.egg-info/entry_points.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.1}/samcode_cli.egg-info/requires.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.1}/samcode_cli.egg-info/top_level.txt +0 -0
- {samcode_cli-1.0.0 → samcode_cli-1.0.1}/setup.cfg +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: samcode-cli
|
|
3
|
+
Version: 1.0.1
|
|
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
|
+
```
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: samcode-cli
|
|
3
|
+
Version: 1.0.1
|
|
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,28 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
# Automatically read the contents of your README.md
|
|
5
|
+
this_directory = Path(__file__).parent
|
|
6
|
+
long_description = (this_directory / "README.md").read_text(encoding="utf-8")
|
|
7
|
+
|
|
8
|
+
setup(
|
|
9
|
+
name='samcode-cli',
|
|
10
|
+
version='1.0.1', # IMPORTANT: You must bump the version number!
|
|
11
|
+
description='An autonomous AI coding agent that runs in your terminal.', # Short description for PyPI search
|
|
12
|
+
long_description=long_description, # The main body of your PyPI page
|
|
13
|
+
long_description_content_type="text/markdown", # Tells PyPI it's Markdown
|
|
14
|
+
author='Magra Houssem Eddine',
|
|
15
|
+
py_modules=['samcode'],
|
|
16
|
+
install_requires=[
|
|
17
|
+
'rich',
|
|
18
|
+
'questionary',
|
|
19
|
+
'prompt_toolkit',
|
|
20
|
+
'requests',
|
|
21
|
+
'beautifulsoup4'
|
|
22
|
+
],
|
|
23
|
+
entry_points={
|
|
24
|
+
'console_scripts': [
|
|
25
|
+
'samcode=samcode:main',
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
)
|
samcode_cli-1.0.0/PKG-INFO
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: samcode-cli
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: SamCode CLI - Autonomous Coding Agent
|
|
5
|
-
Author: Magra Houssem Eddine
|
|
6
|
-
Requires-Dist: rich
|
|
7
|
-
Requires-Dist: questionary
|
|
8
|
-
Requires-Dist: prompt_toolkit
|
|
9
|
-
Requires-Dist: requests
|
|
10
|
-
Requires-Dist: beautifulsoup4
|
|
11
|
-
Dynamic: author
|
|
12
|
-
Dynamic: requires-dist
|
|
13
|
-
Dynamic: summary
|
samcode_cli-1.0.0/README.md
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
# Sam Agent CLI v3.0
|
|
2
|
-
|
|
3
|
-
A powerful autonomous coding agent CLI similar to Claude Code and OpenCode with enhanced features.
|
|
4
|
-
|
|
5
|
-
## ✨ Features
|
|
6
|
-
|
|
7
|
-
### 🤖 AI Provider Support (15+ Providers)
|
|
8
|
-
- **OpenAI** - GPT-4o, GPT-4 Turbo, GPT-3.5
|
|
9
|
-
- **Anthropic** - Claude Opus 4, Sonnet 4, Claude 3.5
|
|
10
|
-
- **Google Gemini** - Gemini 2.0, 1.5 Pro/Flash
|
|
11
|
-
- **DeepSeek** - DeepSeek Chat
|
|
12
|
-
- **Ollama** - Local models (Llama, Mistral, etc.)
|
|
13
|
-
- **Groq** - Fast inference
|
|
14
|
-
- **Mistral AI** - Mistral models
|
|
15
|
-
- **OpenRouter** - Access to 100+ models
|
|
16
|
-
- **Together AI** - Open models
|
|
17
|
-
- **Fireworks AI** - Fast generation
|
|
18
|
-
- **Qwen (Alibaba)** - Chinese models
|
|
19
|
-
- **SambaNova** - Enterprise
|
|
20
|
-
- **Perplexity** - Real-time AI
|
|
21
|
-
- **Google Vertex AI** - Enterprise
|
|
22
|
-
- **Custom** - Your own endpoint
|
|
23
|
-
|
|
24
|
-
### 📎 File Upload & Reading
|
|
25
|
-
Built-in `DocumentReader` that can read any file type:
|
|
26
|
-
|
|
27
|
-
| File Type | Extensions | Support |
|
|
28
|
-
|-----------|------------|---------|
|
|
29
|
-
| Images | jpg, png, gif, bmp, webp, tiff | ✓ Vision + base64 |
|
|
30
|
-
| PDFs | pdf | ✓ Text extraction |
|
|
31
|
-
| Documents | docx, txt, md, rst | ✓ Full parsing |
|
|
32
|
-
| Spreadsheets | xlsx, xls, csv | ✓ Table extraction |
|
|
33
|
-
| Presentations | pptx, ppt | ✓ Slide text |
|
|
34
|
-
| Code | All major languages | ✓ Syntax + analysis |
|
|
35
|
-
|
|
36
|
-
### 🎯 Command Categories
|
|
37
|
-
|
|
38
|
-
#### Core Commands
|
|
39
|
-
| Command | Description |
|
|
40
|
-
|---------|-------------|
|
|
41
|
-
| `/connect` | Configure AI provider (interactive) |
|
|
42
|
-
| `/models` | Select model from your API |
|
|
43
|
-
| `/status` | Show current configuration |
|
|
44
|
-
| `/help` | Show all commands |
|
|
45
|
-
|
|
46
|
-
#### File Operations
|
|
47
|
-
| Command | Description |
|
|
48
|
-
|---------|-------------|
|
|
49
|
-
| `/ls` | List workspace files (tree view) |
|
|
50
|
-
| `/read <file>` | Read file with syntax highlighting |
|
|
51
|
-
| `/read-file <path>` | Read any file (PDF, DOCX, XLSX, etc.) |
|
|
52
|
-
| `/edit <file> <instruction>` | Edit file using AI |
|
|
53
|
-
| `/create <file> <description>` | Create file with AI |
|
|
54
|
-
| `/find <pattern>` | Find files by name |
|
|
55
|
-
| `/grep <pattern>` | Search in files |
|
|
56
|
-
|
|
57
|
-
#### Upload & Attachments
|
|
58
|
-
| Command | Description |
|
|
59
|
-
|---------|-------------|
|
|
60
|
-
| `/upload <path>` | Upload files for processing |
|
|
61
|
-
| `/attach [indices]` | Attach files to next message |
|
|
62
|
-
| `/uploads` | List uploaded files |
|
|
63
|
-
| `/clear-uploads` | Clear uploaded files |
|
|
64
|
-
|
|
65
|
-
#### AI Operations
|
|
66
|
-
| Command | Description |
|
|
67
|
-
|---------|-------------|
|
|
68
|
-
| `/ask <question>` | Ask the AI anything |
|
|
69
|
-
| `/explain <file>` | Explain code in detail |
|
|
70
|
-
| `/refactor <file>` | Refactor code |
|
|
71
|
-
| `/optimize <file>` | Optimize performance |
|
|
72
|
-
| `/debug <file>` | Debug code issues |
|
|
73
|
-
| `/translate <file> <lang>` | Translate to another language |
|
|
74
|
-
| `/review <file>` | Code review |
|
|
75
|
-
| `/plan <goal>` | AI-powered task planning |
|
|
76
|
-
|
|
77
|
-
#### Terminal & Git
|
|
78
|
-
| Command | Description |
|
|
79
|
-
|---------|-------------|
|
|
80
|
-
| `/terminal <cmd>` | Execute shell command |
|
|
81
|
-
| `/run <cmd>` | Execute without confirmation |
|
|
82
|
-
| `/git [action]` | Git operations |
|
|
83
|
-
|
|
84
|
-
#### Testing & Docs
|
|
85
|
-
| Command | Description |
|
|
86
|
-
|---------|-------------|
|
|
87
|
-
| `/test <file>` | Generate pytest tests |
|
|
88
|
-
| `/doc <file>` | Generate documentation |
|
|
89
|
-
|
|
90
|
-
#### Settings
|
|
91
|
-
| Command | Description |
|
|
92
|
-
|---------|-------------|
|
|
93
|
-
| `/cavemanon` | Enable token-saving mode |
|
|
94
|
-
| `/cavemanoff` | Disable caveman mode |
|
|
95
|
-
|
|
96
|
-
### 🏃 Caveman Mode
|
|
97
|
-
|
|
98
|
-
Token-saving mode with two levels:
|
|
99
|
-
|
|
100
|
-
- **Basic** - Reduced verbose output
|
|
101
|
-
- **Ultra** - Maximum token saving
|
|
102
|
-
|
|
103
|
-
Activate: `/cavemanon` → Select level
|
|
104
|
-
Deactivate: `/cavemanoff`
|
|
105
|
-
|
|
106
|
-
### 🖥️ Better CLI UI
|
|
107
|
-
|
|
108
|
-
- Beautiful ASCII art banner
|
|
109
|
-
- Status bar showing provider, model, and mode
|
|
110
|
-
- Interactive selection menus (arrow keys, Enter to select)
|
|
111
|
-
- Side-by-side diff visualization
|
|
112
|
-
- Syntax-highlighted code output
|
|
113
|
-
- Grouped command categories in help
|
|
114
|
-
|
|
115
|
-
## 🚀 Quick Start
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
# Install dependencies
|
|
119
|
-
pip install -r requirements.txt
|
|
120
|
-
|
|
121
|
-
# Run the agent
|
|
122
|
-
python sam_agent.py
|
|
123
|
-
|
|
124
|
-
# Or make executable
|
|
125
|
-
chmod +x sam_agent.py
|
|
126
|
-
./sam_agent.py
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## 📖 Usage Examples
|
|
130
|
-
|
|
131
|
-
### Connect to a Provider
|
|
132
|
-
```
|
|
133
|
-
sam > /connect
|
|
134
|
-
# Select provider with arrow keys
|
|
135
|
-
# Enter API key when prompted
|
|
136
|
-
# Select model
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Upload and Analyze a PDF
|
|
140
|
-
```
|
|
141
|
-
sam > /upload document.pdf
|
|
142
|
-
sam > /read-file document.pdf
|
|
143
|
-
sam > /ask What are the main topics in this document?
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Upload an Image and Ask About It
|
|
147
|
-
```
|
|
148
|
-
sam > /upload screenshot.png
|
|
149
|
-
sam > /attach
|
|
150
|
-
sam > What is shown in this image?
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Edit Code with AI
|
|
154
|
-
```
|
|
155
|
-
sam > /edit main.py Make the code more efficient
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Generate Tests
|
|
159
|
-
```
|
|
160
|
-
sam > /test api.py
|
|
161
|
-
# AI generates tests
|
|
162
|
-
# Preview and confirm
|
|
163
|
-
# Option to run tests
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## 🛡️ Safety Features
|
|
167
|
-
|
|
168
|
-
- Dangerous commands require extra confirmation
|
|
169
|
-
- File changes require user approval
|
|
170
|
-
- Side-by-side diff before writing
|
|
171
|
-
- Command history tracking
|
|
172
|
-
|
|
173
|
-
## 📁 Configuration
|
|
174
|
-
|
|
175
|
-
Configuration is saved in `.samagent/config.json` in your workspace.
|
|
176
|
-
|
|
177
|
-
```json
|
|
178
|
-
{
|
|
179
|
-
"provider": "openai",
|
|
180
|
-
"model": "gpt-4o",
|
|
181
|
-
"caveman_mode": "off",
|
|
182
|
-
"session_id": "abc123"
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## 📋 Requirements
|
|
187
|
-
|
|
188
|
-
- Python 3.8+
|
|
189
|
-
- API key for your chosen provider
|
|
190
|
-
- Internet connection (except for local Ollama)
|
|
191
|
-
|
|
192
|
-
## License
|
|
193
|
-
|
|
194
|
-
MIT
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: samcode-cli
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: SamCode CLI - Autonomous Coding Agent
|
|
5
|
-
Author: Magra Houssem Eddine
|
|
6
|
-
Requires-Dist: rich
|
|
7
|
-
Requires-Dist: questionary
|
|
8
|
-
Requires-Dist: prompt_toolkit
|
|
9
|
-
Requires-Dist: requests
|
|
10
|
-
Requires-Dist: beautifulsoup4
|
|
11
|
-
Dynamic: author
|
|
12
|
-
Dynamic: requires-dist
|
|
13
|
-
Dynamic: summary
|
samcode_cli-1.0.0/setup.py
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from setuptools import setup
|
|
2
|
-
|
|
3
|
-
setup(
|
|
4
|
-
name='samcode-cli',
|
|
5
|
-
version='1.0.0',
|
|
6
|
-
description='SamCode CLI - Autonomous Coding Agent',
|
|
7
|
-
author='Magra Houssem Eddine',
|
|
8
|
-
py_modules=['samcode'], # This links to your samcode.py file
|
|
9
|
-
install_requires=[
|
|
10
|
-
'rich',
|
|
11
|
-
'questionary',
|
|
12
|
-
'prompt_toolkit',
|
|
13
|
-
'requests',
|
|
14
|
-
'beautifulsoup4'
|
|
15
|
-
],
|
|
16
|
-
entry_points={
|
|
17
|
-
'console_scripts': [
|
|
18
|
-
# This is the magic line that creates the 'samcode' command
|
|
19
|
-
'samcode=samcode:main',
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|