@atoship/cli 1.0.0 → 1.0.1
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/README.md +60 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# @atoship/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Your AI-era shipping manager for the terminal. The `@atoship/cli` puts the full power of [atoship](https://atoship.com) on your command line — compare rates across USPS, FedEx, and UPS, buy discounted shipping labels, track packages, and manage shipments without opening a browser.
|
|
4
|
+
|
|
5
|
+
**Before:** Open carrier website → enter addresses → compare rates → download label → copy tracking number.
|
|
6
|
+
|
|
7
|
+
**After:**
|
|
8
|
+
```bash
|
|
9
|
+
ship rate --from 90001 --to 10001 --weight 2oz --cheapest
|
|
10
|
+
ship buy --rate rate_abc123 --from "John|123 Main St|LA|CA|90001" --to "Jane|456 Oak Ave|NY|NY|10001"
|
|
11
|
+
```
|
|
4
12
|
|
|
5
13
|
## Installation
|
|
6
14
|
|
|
@@ -16,18 +24,24 @@ npx @atoship/cli rate --from "LA, CA 90001" --to "NY, NY 10001" --weight 2oz
|
|
|
16
24
|
|
|
17
25
|
## Setup
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
**Step 1:** Sign up free at [atoship.com](https://atoship.com) — no credit card required.
|
|
28
|
+
|
|
29
|
+
**Step 2:** Get your API key from Dashboard → Settings → API Keys.
|
|
30
|
+
|
|
31
|
+
**Step 3:** Save it:
|
|
20
32
|
|
|
21
33
|
```bash
|
|
22
34
|
ship config set-key ak_live_your_key_here
|
|
23
35
|
```
|
|
24
36
|
|
|
25
|
-
Or
|
|
37
|
+
Or use an environment variable:
|
|
26
38
|
|
|
27
39
|
```bash
|
|
28
40
|
export ATOSHIP_API_KEY=ak_live_your_key_here
|
|
29
41
|
```
|
|
30
42
|
|
|
43
|
+
> **Test keys are free:** Use `ak_test_...` keys for development — test labels are never shipped and cost nothing.
|
|
44
|
+
|
|
31
45
|
## Commands
|
|
32
46
|
|
|
33
47
|
### `ship rate` — Compare shipping rates
|
|
@@ -52,22 +66,24 @@ ship rate --from "LA, CA" --to "NY, NY" --weight 2oz --length 12 --width 8 --hei
|
|
|
52
66
|
### `ship buy` — Purchase a shipping label
|
|
53
67
|
|
|
54
68
|
```bash
|
|
55
|
-
# From a rate ID (run "ship rate" first)
|
|
69
|
+
# From a rate ID (run "ship rate" first to get the rate ID)
|
|
56
70
|
ship buy --rate rate_abc123 \
|
|
57
71
|
--from "John Doe|123 Main St|Los Angeles|CA|90001" \
|
|
58
72
|
--to "Jane Smith|456 Oak Ave|New York|NY|10001" \
|
|
59
73
|
--weight 2oz
|
|
60
74
|
|
|
61
|
-
#
|
|
75
|
+
# Specify carrier and service directly
|
|
62
76
|
ship buy --from "John Doe|123 Main St|Los Angeles|CA|90001" \
|
|
63
77
|
--to "Jane Smith|456 Oak Ave|New York|NY|10001" \
|
|
64
78
|
--weight 1lb --carrier USPS --service "Priority Mail"
|
|
65
79
|
|
|
66
|
-
# With
|
|
80
|
+
# With signature confirmation and insurance
|
|
67
81
|
ship buy --from "..." --to "..." --weight 2oz \
|
|
68
82
|
--signature --insurance 100 --reference "ORDER-123"
|
|
69
83
|
```
|
|
70
84
|
|
|
85
|
+
Address format: `"Name|Street|City|State|ZIP"`
|
|
86
|
+
|
|
71
87
|
### `ship track` — Track a package
|
|
72
88
|
|
|
73
89
|
```bash
|
|
@@ -102,13 +118,37 @@ ship config clear # Remove saved config
|
|
|
102
118
|
|
|
103
119
|
## Output Format
|
|
104
120
|
|
|
105
|
-
All commands support `--json` for machine-readable output:
|
|
121
|
+
All commands support `--json` for machine-readable output — perfect for scripts and CI/CD pipelines:
|
|
106
122
|
|
|
107
123
|
```bash
|
|
124
|
+
ship rate --from-zip 90001 --to-zip 10001 --weight 2oz --json | jq '.[0]'
|
|
108
125
|
ship labels --json | jq '.data[].tracking_number'
|
|
109
126
|
ship balance --json | jq '.balance.available'
|
|
110
127
|
```
|
|
111
128
|
|
|
129
|
+
## Why atoship CLI?
|
|
130
|
+
|
|
131
|
+
- **Scriptable** — Automate label purchase in CI/CD, cron jobs, or fulfillment scripts
|
|
132
|
+
- **Fast** — No browser, no clicking — one command from order to label
|
|
133
|
+
- **Cheapest rate** — `--cheapest` flag shows the best price per carrier instantly
|
|
134
|
+
- **Watch mode** — `ship track --watch` polls until delivered, great for monitoring
|
|
135
|
+
- **JSON output** — Pipe into jq, scripts, or webhooks with `--json`
|
|
136
|
+
- **Discounted rates** — USPS, FedEx, and UPS at atoship negotiated pricing
|
|
137
|
+
|
|
138
|
+
## Common Use Cases
|
|
139
|
+
|
|
140
|
+
**CI/CD label generation** — Automatically buy labels when orders are fulfilled:
|
|
141
|
+
```bash
|
|
142
|
+
TRACKING=$(ship buy --carrier USPS --service "Priority Mail" \
|
|
143
|
+
--from "..." --to "..." --weight 2oz --json | jq -r '.tracking_number')
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Batch rate comparison** — Check rates for multiple destinations in a loop.
|
|
147
|
+
|
|
148
|
+
**Shipment monitoring** — Use `--watch` to get notified when a package is delivered.
|
|
149
|
+
|
|
150
|
+
**Order management** — Use `ship labels --json` to sync label status back to your system.
|
|
151
|
+
|
|
112
152
|
## Environment Variables
|
|
113
153
|
|
|
114
154
|
| Variable | Description |
|
|
@@ -119,3 +159,16 @@ ship balance --json | jq '.balance.available'
|
|
|
119
159
|
## Requirements
|
|
120
160
|
|
|
121
161
|
- Node.js >= 18
|
|
162
|
+
|
|
163
|
+
## Support & Contact
|
|
164
|
+
|
|
165
|
+
- **Email:** [support@atoship.com](mailto:support@atoship.com)
|
|
166
|
+
- **Docs:** [atoship.com/docs](https://atoship.com/docs)
|
|
167
|
+
- **API Reference:** [atoship.com/docs/api](https://atoship.com/docs/api)
|
|
168
|
+
- **Dashboard:** [atoship.com/dashboard](https://atoship.com/dashboard)
|
|
169
|
+
|
|
170
|
+
For API key issues, billing questions, or carrier integration support, email support@atoship.com — we respond within one business day.
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
|
|
174
|
+
MIT
|