11# Terraphim AI Assistant
22
3+ [ ![ Crates.io] ( https://img.shields.io/crates/v/terraphim_agent.svg )] ( https://crates.io/crates/terraphim_agent )
4+ [ ![ npm] ( https://img.shields.io/npm/v/@terraphim/autocomplete.svg )] ( https://www.npmjs.com/package/@terraphim/autocomplete )
5+ [ ![ PyPI] ( https://img.shields.io/pypi/v/terraphim-automata.svg )] ( https://pypi.org/project/terraphim-automata/ )
36[ ![ Discord] ( https://img.shields.io/discord/852545081613615144?label=Discord&logo=Discord )] ( https://discord.gg/VPJXB6BGuY )
47[ ![ Discourse] ( https://img.shields.io/discourse/users?server=https%3A%2F%2Fterraphim.discourse.group )] ( https://terraphim.discourse.group )
58
@@ -9,6 +12,27 @@ You can use it as a local search engine, configured to search for different type
912
1013Terraphim operates on local infrastructure and works exclusively for the owner's benefit.
1114
15+ ## 🎉 v1.0.0 Major Release
16+
17+ We're excited to announce Terraphim AI v1.0.0 with comprehensive multi-language support:
18+
19+ ### ✨ New Packages Available
20+ - ** 🦀 Rust** : ` terraphim_agent ` - Complete CLI and TUI interface via crates.io
21+ - ** 📦 Node.js** : ` @terraphim/autocomplete ` - Native npm package with autocomplete and knowledge graph
22+ - ** 🐍 Python** : ` terraphim-automata ` - High-performance text processing library via PyPI
23+
24+ ### 🚀 Quick Installation
25+ ``` bash
26+ # Rust CLI (recommended)
27+ cargo install terraphim_agent
28+
29+ # Node.js package
30+ npm install @terraphim/autocomplete
31+
32+ # Python library
33+ pip install terraphim-automata
34+ ```
35+
1236https://github.com/terraphim/terraphim-ai/assets/175809/59c74652-bab4-45b2-99aa-1c0c9b90196b
1337
1438
@@ -29,26 +53,29 @@ Terraphim aims to bridge this gap by providing a privacy-first AI assistant that
2953[ 3 ] : https://www.forbes.com/sites/forbestechcouncil/2019/12/17/reality-check-still-spending-more-time-gathering-instead-of-analyzing/
3054[ 4 ] : https://www.theatlantic.com/technology/archive/2021/06/the-internet-is-a-collective-hallucination/619320/
3155
32- ## Getting Started
56+ ## 🚀 Getting Started
3357
34- ### 🚀 Quick Install (Recommended)
58+ ### Option 1: Install from Package Managers (Recommended)
3559
36- #### Option 1: Docker (Easiest )
60+ #### 🦀 Rust CLI/TUI (Most Features )
3761``` bash
38- # Automated Docker installation
39- curl -fsSL https://raw.githubusercontent.com/terraphim/terraphim-ai/main/release/v0.2.3/docker-run.sh | bash
62+ cargo install terraphim_agent
63+ terraphim-agent --help
4064```
4165
42- #### Option 2: Binary Installation
66+ #### 📦 Node.js Package (Autocomplete + Knowledge Graph)
4367``` bash
44- # Automated source installation
45- curl -fsSL https://raw.githubusercontent.com/terraphim/terraphim-ai/main/release/v0.2.3/install.sh | bash
68+ npm install @terraphim/autocomplete
69+ # or with Bun
70+ bun add @terraphim/autocomplete
4671```
4772
48- ### 📚 Detailed Installation
49- For detailed installation instructions, see our [ Installation Guide] ( https://github.com/terraphim/terraphim-ai/blob/main/release/v0.2.3/README.md ) .
73+ #### 🐍 Python Library (Text Processing)
74+ ``` bash
75+ pip install terraphim-automata
76+ ```
5077
51- ### 🛠️ Development Setup
78+ ### Option 2: Development Setup
5279
53801 . ** Clone the repository** :
5481 ``` bash
@@ -96,6 +123,104 @@ For detailed installation instructions, see our [Installation Guide](https://git
96123
97124(See the [ desktop README] ( desktop/README.md ) , [ TUI documentation] ( docs/tui-usage.md ) , and [ development setup guide] ( docs/src/development-setup.md ) for more details.)
98125
126+ ## 📚 Usage Examples
127+
128+ ### 🦀 Rust CLI/TUI
129+ ``` bash
130+ # Interactive mode with full features
131+ terraphim-agent
132+
133+ # Search commands
134+ terraphim-agent search " Rust async programming"
135+ terraphim-agent search --role engineer " microservices"
136+
137+ # Chat with AI
138+ terraphim-agent chat " Explain knowledge graphs"
139+
140+ # Commands list
141+ terraphim-agent commands list
142+ terraphim-agent commands search " Rust"
143+
144+ # Auto-update management
145+ terraphim-agent check-update # Check for updates without installing
146+ terraphim-agent update # Update to latest version if available
147+ ```
148+
149+ ### 📦 Node.js Package
150+ ``` javascript
151+ // Import the package
152+ import * as autocomplete from ' @terraphim/autocomplete' ;
153+
154+ // Build autocomplete index from JSON thesaurus
155+ const thesaurus = {
156+ " name" : " Engineering" ,
157+ " data" : {
158+ " machine learning" : {
159+ " id" : 1 ,
160+ " nterm" : " machine learning" ,
161+ " url" : " https://example.com/ml"
162+ }
163+ }
164+ };
165+
166+ const indexBytes = autocomplete .buildAutocompleteIndexFromJson (JSON .stringify (thesaurus));
167+
168+ // Search for terms
169+ const results = autocomplete .autocomplete (indexBytes, " machine" , 10 );
170+ console .log (' Autocomplete results:' , results);
171+
172+ // Knowledge graph operations
173+ const graphBytes = autocomplete .buildRoleGraphFromJson (" Engineer" , JSON .stringify (thesaurus));
174+ const isConnected = autocomplete .areTermsConnected (graphBytes, " machine learning" );
175+ console .log (' Terms connected:' , isConnected);
176+ ```
177+
178+ ### 🐍 Python Library
179+ ``` python
180+ import terraphim_automata as ta
181+
182+ # Create thesaurus
183+ thesaurus = ta.Thesaurus(name = " Engineering" )
184+ thesaurus.add_term(" machine learning" , url = " https://example.com/ml" )
185+ thesaurus.add_term(" deep learning" , url = " https://example.com/dl" )
186+
187+ # Build autocomplete index
188+ index = ta.build_autocomplete_index(thesaurus)
189+ print (f " Index size: { len (index)} bytes " )
190+
191+ # Search for terms
192+ results = ta.autocomplete(index, " machine" , limit = 10 )
193+ for result in results:
194+ print (f " Found: { result.term} (score: { result.score} ) " )
195+
196+ # Fuzzy search
197+ fuzzy_results = ta.fuzzy_autocomplete_search(index, " machin" , min_distance = 0.8 )
198+ print (f " Fuzzy results: { len (fuzzy_results)} " )
199+ ```
200+
201+ ## 🆕 v1.0.0 Features
202+
203+ ### 🔍 Enhanced Search Capabilities
204+ - ** Grep.app Integration** : Search across 500,000+ GitHub repositories
205+ - ** Advanced Filtering** : Language, repository, and path-based filtering
206+ - ** Semantic Search** : Knowledge graph-powered semantic understanding
207+
208+ ### 📊 Multi-Language Support
209+ - ** Rust** : Native performance with complete CLI/TUI interface
210+ - ** Node.js** : High-performance autocomplete with native bindings
211+ - ** Python** : Fast text processing and autocomplete algorithms
212+
213+ ### 🤖 AI Integration
214+ - ** MCP Server** : Model Context Protocol for AI tool integration
215+ - ** Claude Code Hooks** : Automated development workflows
216+ - ** Knowledge Graphs** : Semantic relationship analysis and discovery
217+
218+ ### 🔄 Auto-Update System
219+ - ** Seamless Updates** : Self-updating CLI using GitHub Releases
220+ - ** Cross-Platform** : Works on Linux, macOS, and Windows
221+ - ** Smart Versioning** : Intelligent version comparison and update detection
222+ - ** Progress Tracking** : Real-time download progress and status indicators
223+
99224## Terminal Agent Interface
100225
101226Terraphim includes a comprehensive terminal agent that provides both interactive REPL functionality and CLI commands for advanced operations:
@@ -111,6 +236,59 @@ Terraphim includes a comprehensive terminal agent that provides both interactive
111236- ** 📁 File Operations** : Semantic file analysis and intelligent content management
112237- ** 🔍 Knowledge Graph** : Interactive rolegraph visualization and navigation
113238- ** ⚙️ Configuration** : Real-time role and configuration management
239+ - ** 🔄 Auto-Update** : Seamless self-updating mechanism using GitHub Releases
240+
241+ ### 🔄 Auto-Update System
242+
243+ Terraphim-agent includes a built-in auto-update system that keeps your installation current with the latest releases from GitHub.
244+
245+ #### Features
246+ - ** 🚀 Seamless Updates** : Automatic binary replacement without manual intervention
247+ - ** 📊 Progress Tracking** : Real-time download progress and status indicators
248+ - ** 🔒 Secure Verification** : GitHub Releases integration ensures authenticated updates
249+ - ** 🌐 Cross-Platform** : Works on Linux, macOS, and Windows
250+ - ** 📋 Version Intelligence** : Smart version comparison and update availability detection
251+
252+ #### Usage
253+
254+ ``` bash
255+ # Check for updates without installing
256+ terraphim-agent check-update
257+
258+ # Update to latest version if available
259+ terraphim-agent update
260+
261+ # Get help for update commands
262+ terraphim-agent check-update --help
263+ terraphim-agent update --help
264+ ```
265+
266+ #### Update Status Messages
267+
268+ - ** 🔍 Checking** : "🔍 Checking for terraphim-agent updates..."
269+ - ** ✅ Up-to-date** : "✅ Already running latest version: X.Y.Z"
270+ - ** 📦 Update Available** : "📦 Update available: X.Y.Z → A.B.C"
271+ - ** 🚀 Updated** : "🚀 Updated from X.Y.Z to A.B.C"
272+ - ** ❌ Failed** : "❌ Update failed: [ error details] "
273+
274+ #### Technical Details
275+
276+ - ** Source** : GitHub Releases from ` terraphim/terraphim-ai ` repository
277+ - ** Mechanism** : Rust ` self_update ` crate with secure binary verification
278+ - ** Architecture** : Async-safe implementation using ` tokio::task::spawn_blocking `
279+ - ** Compatibility** : Requires internet connectivity for update checks
280+
281+ #### Example Workflow
282+
283+ ``` bash
284+ $ terraphim-agent check-update
285+ 🔍 Checking for terraphim-agent updates...
286+ 📦 Update available: 1.0.0 → 1.0.1
287+
288+ $ terraphim-agent update
289+ 🚀 Updating terraphim-agent...
290+ ✅ Already running latest version: 1.0.1
291+ ```
114292
115293### Quick Start
116294
@@ -119,7 +297,7 @@ Terraphim includes a comprehensive terminal agent that provides both interactive
119297cargo build -p terraphim_tui --features repl-full --release
120298
121299# Launch interactive REPL
122- ./target/release/terraphim-tui
300+ ./target/release/terraphim-agent
123301
124302# Available REPL commands:
125303/help # Show all commands
@@ -133,7 +311,7 @@ cargo build -p terraphim_tui --features repl-full --release
133311/file search # Semantic file operations
134312```
135313
136- For detailed documentation, see [ TUI Usage Guide] ( docs/tui-usage.md ) .
314+ For detailed documentation, see [ TUI Usage Guide] ( docs/tui-usage.md ) and [ Auto-Update System ] ( docs/autoupdate.md ) .
137315
138316## Terminology
139317
@@ -222,7 +400,7 @@ This installs the server, terminal agent, and desktop app (macOS only).
222400``` bash
223401# Download from GitHub releases
224402sudo dpkg -i terraphim-server_* .deb
225- sudo dpkg -i terraphim-tui_ * .deb
403+ sudo dpkg -i terraphim-agent_ * .deb
226404sudo dpkg -i terraphim-ai-desktop_* .deb
227405```
228406
0 commit comments