tisit-cli 0.1.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.
Files changed (48) hide show
  1. tisit_cli-0.1.0/.gitignore +186 -0
  2. tisit_cli-0.1.0/LICENSE +21 -0
  3. tisit_cli-0.1.0/PKG-INFO +114 -0
  4. tisit_cli-0.1.0/README.md +79 -0
  5. tisit_cli-0.1.0/pyproject.toml +57 -0
  6. tisit_cli-0.1.0/src/tisit_cli/__init__.py +2 -0
  7. tisit_cli-0.1.0/src/tisit_cli/auth.py +54 -0
  8. tisit_cli-0.1.0/src/tisit_cli/client.py +392 -0
  9. tisit_cli-0.1.0/src/tisit_cli/commands/__init__.py +0 -0
  10. tisit_cli-0.1.0/src/tisit_cli/commands/article_commands.py +132 -0
  11. tisit_cli-0.1.0/src/tisit_cli/commands/auth_commands.py +91 -0
  12. tisit_cli-0.1.0/src/tisit_cli/commands/book_commands.py +186 -0
  13. tisit_cli-0.1.0/src/tisit_cli/commands/browse_commands.py +76 -0
  14. tisit_cli-0.1.0/src/tisit_cli/commands/chat_commands.py +94 -0
  15. tisit_cli-0.1.0/src/tisit_cli/commands/focus_commands.py +198 -0
  16. tisit_cli-0.1.0/src/tisit_cli/commands/graph_commands.py +126 -0
  17. tisit_cli-0.1.0/src/tisit_cli/commands/note_commands.py +131 -0
  18. tisit_cli-0.1.0/src/tisit_cli/commands/paper_commands.py +134 -0
  19. tisit_cli-0.1.0/src/tisit_cli/commands/patent_commands.py +138 -0
  20. tisit_cli-0.1.0/src/tisit_cli/commands/podcast_commands.py +132 -0
  21. tisit_cli-0.1.0/src/tisit_cli/commands/radar_commands.py +246 -0
  22. tisit_cli-0.1.0/src/tisit_cli/commands/search_commands.py +42 -0
  23. tisit_cli-0.1.0/src/tisit_cli/commands/status_commands.py +50 -0
  24. tisit_cli-0.1.0/src/tisit_cli/commands/tweet_commands.py +132 -0
  25. tisit_cli-0.1.0/src/tisit_cli/commands/video_commands.py +132 -0
  26. tisit_cli-0.1.0/src/tisit_cli/config.py +53 -0
  27. tisit_cli-0.1.0/src/tisit_cli/display.py +582 -0
  28. tisit_cli-0.1.0/src/tisit_cli/exceptions.py +29 -0
  29. tisit_cli-0.1.0/src/tisit_cli/main.py +68 -0
  30. tisit_cli-0.1.0/tests/__init__.py +0 -0
  31. tisit_cli-0.1.0/tests/conftest.py +36 -0
  32. tisit_cli-0.1.0/tests/test_article_commands.py +101 -0
  33. tisit_cli-0.1.0/tests/test_auth.py +52 -0
  34. tisit_cli-0.1.0/tests/test_book_commands.py +97 -0
  35. tisit_cli-0.1.0/tests/test_browse_status_commands.py +88 -0
  36. tisit_cli-0.1.0/tests/test_chat_commands.py +72 -0
  37. tisit_cli-0.1.0/tests/test_client.py +189 -0
  38. tisit_cli-0.1.0/tests/test_config.py +41 -0
  39. tisit_cli-0.1.0/tests/test_focus_commands.py +98 -0
  40. tisit_cli-0.1.0/tests/test_graph_commands.py +94 -0
  41. tisit_cli-0.1.0/tests/test_note_commands.py +100 -0
  42. tisit_cli-0.1.0/tests/test_paper_commands.py +117 -0
  43. tisit_cli-0.1.0/tests/test_patent_commands.py +95 -0
  44. tisit_cli-0.1.0/tests/test_podcast_commands.py +80 -0
  45. tisit_cli-0.1.0/tests/test_radar_commands.py +119 -0
  46. tisit_cli-0.1.0/tests/test_search_commands.py +71 -0
  47. tisit_cli-0.1.0/tests/test_tweet_commands.py +82 -0
  48. tisit_cli-0.1.0/tests/test_video_commands.py +81 -0
@@ -0,0 +1,186 @@
1
+ # Ignore environment variables file
2
+ .env
3
+ .startme
4
+ Codex_Notes.txt
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ .vscode
11
+ website/__pycache__
12
+ website/database.commands.py
13
+ .xlsx
14
+
15
+ # C extensions
16
+ *.so
17
+
18
+ # Distribution / packaging
19
+ .Python
20
+ build/
21
+ develop-eggs/
22
+ dist/
23
+ downloads/
24
+ eggs/
25
+ .eggs/
26
+ lib/
27
+ lib64/
28
+ parts/
29
+ sdist/
30
+ var/
31
+ wheels/
32
+ share/python-wheels/
33
+ *.egg-info/
34
+ .installed.cfg
35
+ *.egg
36
+ MANIFEST
37
+
38
+ # PyInstaller
39
+ # Usually these files are written by a python script from a template
40
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
41
+ *.manifest
42
+ *.spec
43
+
44
+ # Installer logs
45
+ pip-log.txt
46
+ pip-delete-this-directory.txt
47
+
48
+ # Unit test / coverage reports
49
+ htmlcov/
50
+ .tox/
51
+ .nox/
52
+ .coverage
53
+ .coverage.*
54
+ .cache
55
+ nosetests.xml
56
+ coverage.xml
57
+ *.cover
58
+ *.py,cover
59
+ .hypothesis/
60
+ .pytest_cache/
61
+ cover/
62
+
63
+ # Translations
64
+ *.mo
65
+ *.pot
66
+
67
+ # Django stuff:
68
+ *.log
69
+ local_settings.py
70
+ db.sqlite3
71
+ db.sqlite3-journal
72
+
73
+ # Flask stuff:
74
+ instance/
75
+ .webassets-cache
76
+
77
+ # Scrapy stuff:
78
+ .scrapy
79
+
80
+ # Sphinx documentation
81
+ docs/_build/
82
+
83
+ # PyBuilder
84
+ .pybuilder/
85
+ target/
86
+
87
+ # Jupyter Notebook
88
+ .ipynb_checkpoints
89
+
90
+ # IPython
91
+ profile_default/
92
+ ipython_config.py
93
+
94
+ # pyenv
95
+ # For a library or package, you might want to ignore these files since the code is
96
+ # intended to run in multiple environments; otherwise, check them in:
97
+ # .python-version
98
+
99
+ # pipenv
100
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
101
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
102
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
103
+ # install all needed dependencies.
104
+ #Pipfile.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ #poetry.lock
112
+
113
+ # pdm
114
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115
+ #pdm.lock
116
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
117
+ # in version control.
118
+ # https://pdm.fming.dev/#use-with-ide
119
+ .pdm.toml
120
+
121
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
122
+ __pypackages__/
123
+
124
+ # Celery stuff
125
+ celerybeat-schedule
126
+ celerybeat.pid
127
+
128
+ # SageMath parsed files
129
+ *.sage.py
130
+
131
+ # Environments
132
+ .env
133
+ .venv
134
+ env/
135
+ venv/
136
+ ENV/
137
+ env.bak/
138
+ venv.bak/
139
+ tisitenv/
140
+ tisitenv312/
141
+ .tisitenv/
142
+ venv_test/
143
+
144
+ # Spyder project settings
145
+ .spyderproject
146
+ .spyproject
147
+
148
+ # Rope project settings
149
+ .ropeproject
150
+
151
+ # mkdocs documentation
152
+ /site
153
+
154
+ # mypy
155
+ .mypy_cache/
156
+ .dmypy.json
157
+ dmypy.json
158
+
159
+ # Pyre type checker
160
+ .pyre/
161
+
162
+ # pytype static type analyzer
163
+ .pytype/
164
+
165
+ # Cython debug symbols
166
+ cython_debug/
167
+
168
+ # PyCharm
169
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
170
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
171
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
172
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
173
+ #.idea/
174
+
175
+ # Chroma vector database files
176
+ data/chroma_db/
177
+ logs/
178
+
179
+ # Redis database dump
180
+ dump.rdb
181
+
182
+ # User uploads
183
+ uploads/
184
+
185
+ # Temporary files
186
+ requirements_temp.txt
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vamsi Duvvuri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: tisit-cli
3
+ Version: 0.1.0
4
+ Summary: CLI for the TISIT learning platform — learn anything, explained intelligently
5
+ Project-URL: Homepage, https://tisit.ai
6
+ Project-URL: Repository, https://github.com/VeeDuvv/tisitv0
7
+ Project-URL: Issues, https://github.com/VeeDuvv/tisitv0/issues
8
+ Author-email: Vamsi Duvvuri <admin@tisit.ai>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,cli,knowledge,learning,tisit
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Education
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: httpx>=0.25.0
25
+ Requires-Dist: keyring>=24.0.0
26
+ Requires-Dist: rich>=13.0.0
27
+ Requires-Dist: tomli-w>=1.0.0
28
+ Requires-Dist: tomli>=2.0.0; python_version < '3.11'
29
+ Requires-Dist: typer[all]>=0.9.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: flake8>=6.0; extra == 'dev'
32
+ Requires-Dist: pytest>=7.0; extra == 'dev'
33
+ Requires-Dist: respx>=0.20.0; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # tisit-cli
37
+
38
+ Terminal-native client for the [TISIT](https://tisit.ai) learning platform. If you can do it on the web, you can do it from the shell.
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ pip install tisit-cli
44
+ ```
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ # Authenticate (get your API token from tisit.ai settings)
50
+ tisit login
51
+
52
+ # Explore your knowledge
53
+ tisit note list
54
+ tisit search "machine learning"
55
+ tisit chat ask "What are transformers?"
56
+
57
+ # Add content
58
+ tisit note add "Neural Networks" "Deep Learning"
59
+ tisit paper add https://arxiv.org/pdf/1706.03762
60
+ tisit article add https://example.com/article
61
+ tisit video add https://youtube.com/watch?v=abc
62
+ tisit book search "Deep Learning"
63
+
64
+ # Intelligence monitoring
65
+ tisit radar status
66
+ tisit radar topic add "AI Safety" --keywords "alignment,safety"
67
+
68
+ # Knowledge graph
69
+ tisit graph stats
70
+ tisit graph neighbors "machine learning"
71
+ tisit graph paths "Neural Networks" "NLP"
72
+
73
+ # Deep dive learning
74
+ tisit focus create "Quantum Computing"
75
+ tisit focus list
76
+ ```
77
+
78
+ ## Commands
79
+
80
+ | Command | Description |
81
+ |---------|-------------|
82
+ | `tisit login/logout/whoami` | Authentication |
83
+ | `tisit status` | System health check |
84
+ | `tisit note add/list/view/delete` | Learning notes |
85
+ | `tisit paper add/list/view/delete` | Research papers |
86
+ | `tisit article add/list/view/delete` | Web articles |
87
+ | `tisit video add/list/view/delete` | YouTube videos |
88
+ | `tisit tweet add/list/view/delete` | Tweets / X posts |
89
+ | `tisit book search/add/list/view/delete` | Books |
90
+ | `tisit podcast add/list/view/delete` | Podcast episodes |
91
+ | `tisit patent add/list/view/delete` | Patents |
92
+ | `tisit search "query"` | Semantic search |
93
+ | `tisit browse --type notes` | Unified content browsing |
94
+ | `tisit chat` | Interactive RAG chat |
95
+ | `tisit chat ask "question"` | One-shot question |
96
+ | `tisit radar status/topic/run/source` | Radar sweep monitoring |
97
+ | `tisit graph stats/neighbors/paths` | Knowledge graph |
98
+ | `tisit focus list/create/view/delete` | Focus mode (deep dive) |
99
+
100
+ All commands support `--json` for scripted output.
101
+
102
+ ## Configuration
103
+
104
+ Config is stored at `~/.tisit/config.toml`. Override the server URL:
105
+
106
+ ```bash
107
+ tisit login --api-url https://your-server.com
108
+ # or
109
+ export TISIT_API_URL=https://your-server.com
110
+ ```
111
+
112
+ ## License
113
+
114
+ MIT
@@ -0,0 +1,79 @@
1
+ # tisit-cli
2
+
3
+ Terminal-native client for the [TISIT](https://tisit.ai) learning platform. If you can do it on the web, you can do it from the shell.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install tisit-cli
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Authenticate (get your API token from tisit.ai settings)
15
+ tisit login
16
+
17
+ # Explore your knowledge
18
+ tisit note list
19
+ tisit search "machine learning"
20
+ tisit chat ask "What are transformers?"
21
+
22
+ # Add content
23
+ tisit note add "Neural Networks" "Deep Learning"
24
+ tisit paper add https://arxiv.org/pdf/1706.03762
25
+ tisit article add https://example.com/article
26
+ tisit video add https://youtube.com/watch?v=abc
27
+ tisit book search "Deep Learning"
28
+
29
+ # Intelligence monitoring
30
+ tisit radar status
31
+ tisit radar topic add "AI Safety" --keywords "alignment,safety"
32
+
33
+ # Knowledge graph
34
+ tisit graph stats
35
+ tisit graph neighbors "machine learning"
36
+ tisit graph paths "Neural Networks" "NLP"
37
+
38
+ # Deep dive learning
39
+ tisit focus create "Quantum Computing"
40
+ tisit focus list
41
+ ```
42
+
43
+ ## Commands
44
+
45
+ | Command | Description |
46
+ |---------|-------------|
47
+ | `tisit login/logout/whoami` | Authentication |
48
+ | `tisit status` | System health check |
49
+ | `tisit note add/list/view/delete` | Learning notes |
50
+ | `tisit paper add/list/view/delete` | Research papers |
51
+ | `tisit article add/list/view/delete` | Web articles |
52
+ | `tisit video add/list/view/delete` | YouTube videos |
53
+ | `tisit tweet add/list/view/delete` | Tweets / X posts |
54
+ | `tisit book search/add/list/view/delete` | Books |
55
+ | `tisit podcast add/list/view/delete` | Podcast episodes |
56
+ | `tisit patent add/list/view/delete` | Patents |
57
+ | `tisit search "query"` | Semantic search |
58
+ | `tisit browse --type notes` | Unified content browsing |
59
+ | `tisit chat` | Interactive RAG chat |
60
+ | `tisit chat ask "question"` | One-shot question |
61
+ | `tisit radar status/topic/run/source` | Radar sweep monitoring |
62
+ | `tisit graph stats/neighbors/paths` | Knowledge graph |
63
+ | `tisit focus list/create/view/delete` | Focus mode (deep dive) |
64
+
65
+ All commands support `--json` for scripted output.
66
+
67
+ ## Configuration
68
+
69
+ Config is stored at `~/.tisit/config.toml`. Override the server URL:
70
+
71
+ ```bash
72
+ tisit login --api-url https://your-server.com
73
+ # or
74
+ export TISIT_API_URL=https://your-server.com
75
+ ```
76
+
77
+ ## License
78
+
79
+ MIT
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "tisit-cli"
7
+ version = "0.1.0"
8
+ description = "CLI for the TISIT learning platform — learn anything, explained intelligently"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ {name = "Vamsi Duvvuri", email = "admin@tisit.ai"},
14
+ ]
15
+ keywords = ["tisit", "cli", "learning", "ai", "knowledge"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Topic :: Education",
27
+ "Topic :: Utilities",
28
+ ]
29
+ dependencies = [
30
+ "typer[all]>=0.9.0",
31
+ "rich>=13.0.0",
32
+ "httpx>=0.25.0",
33
+ "keyring>=24.0.0",
34
+ "tomli>=2.0.0;python_version<'3.11'",
35
+ "tomli-w>=1.0.0",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://tisit.ai"
40
+ Repository = "https://github.com/VeeDuvv/tisitv0"
41
+ Issues = "https://github.com/VeeDuvv/tisitv0/issues"
42
+
43
+ [project.scripts]
44
+ tisit = "tisit_cli.main:app"
45
+
46
+ [project.optional-dependencies]
47
+ dev = [
48
+ "pytest>=7.0",
49
+ "respx>=0.20.0",
50
+ "flake8>=6.0",
51
+ ]
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["src/tisit_cli"]
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = ["tests"]
@@ -0,0 +1,2 @@
1
+ """TISIT CLI — terminal-native client for the TISIT learning platform."""
2
+ __version__ = "0.1.0"
@@ -0,0 +1,54 @@
1
+ """Token storage — keyring with file fallback."""
2
+ import os
3
+ import stat
4
+ from pathlib import Path
5
+
6
+ SERVICE_NAME = "tisit-cli"
7
+ TOKEN_FILE = Path.home() / ".tisit" / "token"
8
+
9
+
10
+ def store_token(token: str) -> None:
11
+ """Store API token securely."""
12
+ try:
13
+ import keyring
14
+ keyring.set_password(SERVICE_NAME, "api_token", token)
15
+ # Clean up file if migrating to keyring
16
+ if TOKEN_FILE.exists():
17
+ TOKEN_FILE.unlink()
18
+ return
19
+ except Exception:
20
+ pass
21
+ # File fallback
22
+ TOKEN_FILE.parent.mkdir(parents=True, exist_ok=True)
23
+ TOKEN_FILE.write_text(token)
24
+ os.chmod(TOKEN_FILE, stat.S_IRUSR | stat.S_IWUSR)
25
+
26
+
27
+ def get_token() -> str | None:
28
+ """Retrieve stored API token."""
29
+ try:
30
+ import keyring
31
+ token = keyring.get_password(SERVICE_NAME, "api_token")
32
+ if token:
33
+ return token
34
+ except Exception:
35
+ pass
36
+ if TOKEN_FILE.exists():
37
+ return TOKEN_FILE.read_text().strip()
38
+ return None
39
+
40
+
41
+ def delete_token() -> None:
42
+ """Remove stored API token."""
43
+ try:
44
+ import keyring
45
+ keyring.delete_password(SERVICE_NAME, "api_token")
46
+ except Exception:
47
+ pass
48
+ if TOKEN_FILE.exists():
49
+ TOKEN_FILE.unlink()
50
+
51
+
52
+ def validate_token_format(token: str) -> bool:
53
+ """Check that the token has the expected tsk_ prefix and length."""
54
+ return token.startswith("tsk_") and len(token) >= 20