@hasna/contacts 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,180 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is
37
+ included in or attached to the work (an example is provided
38
+ in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other
43
+ transformations represent, as a whole, an original work of authorship.
44
+ For the purposes of this License, Derivative Works shall not include
45
+ works that remain separable from, or merely link (or bind by name)
46
+ to the interfaces of, the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
49
+ in the Work by the copyright owner or by an Individual or Legal Entity
50
+ authorized to submit on behalf of the copyright owner. For the purposes
51
+ of this definition, "submitted" means any form of electronic, verbal,
52
+ or written communication sent to the Licensor or its representatives,
53
+ including but not limited to communication on electronic mailing lists,
54
+ source code control systems, and issue tracking systems that are managed
55
+ by, or on behalf of, the Licensor for the purpose of documenting and
56
+ discussing improvements to the Work, but excluding communication that is
57
+ conspicuously marked or designated in writing by the copyright owner as
58
+ "Not a Contribution."
59
+
60
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
61
+ whom a Contribution has been received by the Licensor and included
62
+ within the Work.
63
+
64
+ 2. Grant of Copyright License. Subject to the terms and conditions of
65
+ this License, each Contributor hereby grants to You a perpetual,
66
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
67
+ copyright license to reproduce, prepare Derivative Works of,
68
+ publicly display, publicly perform, sublicense, and distribute the
69
+ Work and such Derivative Works in Source or Object form.
70
+
71
+ 3. Grant of Patent License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ (except as stated in this section) patent license to make, have made,
75
+ use, offer to sell, sell, import, and otherwise transfer the Work,
76
+ where such license applies only to those patent claims licensable
77
+ by such Contributor that are necessarily infringed by their
78
+ Contribution(s) alone or by the combination of their Contribution(s)
79
+ with the Work to which such Contribution(s) were submitted. If You
80
+ institute patent litigation against any entity (including a cross-claim
81
+ or counterclaim in a lawsuit) alleging that the Work or any claim
82
+ constituting direct or indirect patent infringement, then any patent
83
+ licenses granted to You under this License for that Work shall
84
+ terminate as of the date such litigation is filed.
85
+
86
+ 4. Redistribution. You may reproduce and distribute copies of the
87
+ Work or Derivative Works thereof in any medium, with or without
88
+ modifications, and in Source or Object form, provided that You
89
+ meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or
92
+ Derivative Works a copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices
95
+ stating that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Work,
98
+ any patent, copyright, trademark, and other attribution
99
+ notices from the Source form of the Work, excluding those
100
+ notices that do not pertain to any part of the Derivative
101
+ Works; and
102
+
103
+ (d) If the Work includes a "NOTICE" text file as part of its
104
+ distribution, then You must include a readable copy of the
105
+ attribution notices contained within such NOTICE file, in
106
+ at least one of the following places: within a NOTICE text
107
+ file distributed as part of the Derivative Works; within
108
+ the Source form or documentation, if provided along with the
109
+ Derivative Works; or, within a display generated by the
110
+ Derivative Works, if and wherever such third-party notices
111
+ normally appear. The contents of the NOTICE file are for
112
+ informational purposes only and do not modify the License.
113
+ You may add Your own attribution notices within Derivative
114
+ Works that You place alongside or in addition to the NOTICE
115
+ text from the Work, provided that such additional attribution
116
+ notices cannot be construed as modifying the License.
117
+
118
+ You may add Your own license statement for Your modifications and
119
+ may provide additional terms and conditions for use, reproduction,
120
+ or modification of Your Derivative Works, as set forth in Section 6,
121
+ provided, however, that such additional terms do not contradict the
122
+ terms of this License.
123
+
124
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
125
+ any Contribution intentionally submitted for inclusion in the Work
126
+ by You to the Licensor shall be under the terms and conditions of
127
+ this License, without any additional terms or conditions.
128
+ Notwithstanding the above, nothing herein shall supersede or modify
129
+ the terms of any separate license agreement you may have executed
130
+ with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade
133
+ names, trademarks, service marks, or product names of the Licensor,
134
+ except as required for reasonable and customary use in describing the
135
+ origin of the Work and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or
138
+ agreed to in writing, Licensor provides the Work (and each
139
+ Contributor provides its Contributions) on an "AS IS" BASIS,
140
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
141
+ implied, including, without limitation, any conditions of
142
+ TITLE, MERCHANTIBILITY, or FITNESS FOR A PARTICULAR PURPOSE.
143
+ You are solely responsible for determining the appropriateness of
144
+ using or reproducing the Work and assume any risks associated with
145
+ Your exercise of permissions under this License.
146
+
147
+ 8. Limitation of Liability. In no event and under no legal theory,
148
+ whether in tort (including negligence), contract, or otherwise,
149
+ unless required by applicable law (such as deliberate and grossly
150
+ negligent acts) or agreed to in writing, shall any Contributor be
151
+ liable to You for damages, including any direct, indirect, special,
152
+ incidental, or exemplary damages of any character arising as a
153
+ result of this License or out of the use or inability to use the
154
+ Work (even if such Contributor has been advised of the possibility
155
+ of such damages).
156
+
157
+ 9. Accepting Warranty or Additional Liability. While redistributing
158
+ the Work or Derivative Works thereof, You may choose to offer,
159
+ and charge a fee for, acceptance of support, warranty, indemnity,
160
+ or other liability obligations and/or rights consistent with this
161
+ License. However, in accepting such obligations, You may offer only
162
+ conditions that are consistent with this License and agree that
163
+ indemnity or any other liability be Your responsibility for any
164
+ obligations accepted beyond the terms of this License.
165
+
166
+ END OF TERMS AND CONDITIONS
167
+
168
+ Copyright 2025 Andrei Hasna
169
+
170
+ Licensed under the Apache License, Version 2.0 (the "License");
171
+ you may not use this file except in compliance with the License.
172
+ You may obtain a copy of the License at
173
+
174
+ http://www.apache.org/licenses/LICENSE-2.0
175
+
176
+ Unless required by applicable law or agreed to in writing, software
177
+ distributed under the License is distributed on an "AS IS" BASIS,
178
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
179
+ See the License for the specific language governing permissions and
180
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # @hasna/contacts
2
+
3
+ Contact management for AI coding agents — CLI + MCP server + Web dashboard
4
+
5
+ A modern rolodex for AI agents and humans. Store contacts, companies, tags, relationships, social profiles, and more.
6
+
7
+ ## Features
8
+
9
+ - **MCP server** — 24 tools for AI agents (Claude, Codex, Gemini)
10
+ - **CLI** — beautiful terminal interface
11
+ - **Web dashboard** — React/Vite UI
12
+ - **Rich data model** — contacts, companies, tags, relationships, emails, phones, addresses, social profiles
13
+ - **Import/Export** — CSV, vCard (.vcf), JSON
14
+ - **Full-text search** — FTS5-powered search
15
+ - **SQLite** — zero-config, file-based storage at `~/.contacts/contacts.db`
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ bun install -g @hasna/contacts
21
+ # or
22
+ npm install -g @hasna/contacts
23
+ ```
24
+
25
+ ## CLI Usage
26
+
27
+ ```bash
28
+ contacts add # Add a contact interactively
29
+ contacts list # List all contacts
30
+ contacts list --tag vip # Filter by tag
31
+ contacts show <id> # Show contact details
32
+ contacts search "John" # Search contacts
33
+ contacts edit <id> # Edit a contact
34
+ contacts delete <id> # Delete a contact
35
+ contacts import contacts.csv # Import from CSV/vCard/JSON
36
+ contacts export --format vcf # Export as vCard
37
+ contacts companies # List companies
38
+ contacts tags # Manage tags
39
+ contacts serve # Start web dashboard
40
+ contacts mcp # Show MCP setup
41
+ ```
42
+
43
+ ## MCP Setup
44
+
45
+ Add to your Claude Code config:
46
+ ```bash
47
+ claude mcp add --transport stdio --scope user contacts -- contacts-mcp
48
+ ```
49
+
50
+ Or add to `~/.claude.json`:
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "contacts": {
55
+ "command": "contacts-mcp",
56
+ "args": []
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## MCP Tools
63
+
64
+ | Tool | Description |
65
+ |------|-------------|
66
+ | `create_contact` | Create a new contact |
67
+ | `get_contact` | Get contact by ID |
68
+ | `update_contact` | Update contact fields |
69
+ | `delete_contact` | Delete a contact |
70
+ | `list_contacts` | List contacts with filters |
71
+ | `search_contacts` | Full-text search |
72
+ | `create_company` | Create a company |
73
+ | `get_company` | Get company by ID |
74
+ | `list_companies` | List companies |
75
+ | `search_companies` | Search companies |
76
+ | `create_tag` | Create a tag |
77
+ | `list_tags` | List all tags |
78
+ | `add_tag_to_contact` | Tag a contact |
79
+ | `add_relationship` | Link contacts |
80
+ | `merge_contacts` | Merge duplicate contacts |
81
+ | `import_contacts` | Import CSV/vCard/JSON |
82
+ | `export_contacts` | Export contacts |
83
+ | `get_stats` | Get database stats |
84
+
85
+ ## Environment
86
+
87
+ | Variable | Default | Description |
88
+ |----------|---------|-------------|
89
+ | `CONTACTS_DB_PATH` | `~/.contacts/contacts.db` | SQLite database path |
90
+
91
+ ## License
92
+
93
+ Apache-2.0 © Andrei Hasna