samcode-cli 1.0.0__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.
@@ -0,0 +1,13 @@
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
@@ -0,0 +1,194 @@
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
@@ -0,0 +1,13 @@
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
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ samcode_cli.egg-info/PKG-INFO
4
+ samcode_cli.egg-info/SOURCES.txt
5
+ samcode_cli.egg-info/dependency_links.txt
6
+ samcode_cli.egg-info/entry_points.txt
7
+ samcode_cli.egg-info/requires.txt
8
+ samcode_cli.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ samcode = samcode:main
@@ -0,0 +1,5 @@
1
+ rich
2
+ questionary
3
+ prompt_toolkit
4
+ requests
5
+ beautifulsoup4
@@ -0,0 +1 @@
1
+ samcode
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,22 @@
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
+ )