CLI v1.0

ant-go CLI

Build app iOS và Android nhanh chóng chỉ với một lệnh — không cần cấu hình CI/CD phức tạp.

Cài đặt

Cài đặt ant-go globally qua npm để dùng như một lệnh hệ thống:

Terminal
$ npm install -g ant-go

Kiểm tra cài đặt thành công:

Terminal
$ ant --version
0.1.0

Build Command

Lệnh chính — nén project, upload lên build server và gửi yêu cầu build theo platform đã chọn. Sau khi submit, theo dõi tiến trình tại web console.

Terminal — build iOS production
$ ant build --platform ios
========================================
== Ant Go CLI : v0.1.0 ==
== Project ID : my-app-prod ==
== Bundle ID : com.myorg.myapp ==
== Profile : production (store) ==
========================================
✔ Job: abc123xyz
✔ ASC API Key (cached): XXXXXXXXXX
✔ Distribution Certificate (reused): CERTID
✔ App Store Provisioning Profile OK
✔ Project packed: 12.4 MB
✔ Upload ios.tar.gz done
✔ Upload credentials.json done
Build sent to server!
Track progress:
https://antgo.work/account/app/MyApp/builds/abc123xyz

Dùng build profile từ ant.json:

Terminal
$ ant build --platform ios --profile development

Tự động submit lên TestFlight sau khi build xong:

Terminal
$ ant build --platform ios --auto-submit
...
Build sent to server!
Auto Submit: on

Chỉ dùng được với profile có distribution: store. Dùng với distribution: internal sẽ báo lỗi.

Force đăng nhập lại Apple Developer (bỏ cache):

Terminal
$ ant build --platform ios --reauth

Options

--platform <platform>Nền tảng build: ios hoặc android
--profile <profile>Build profile trong ant.json (mặc định: production)
--project <path>Override đường dẫn project
--reauthĐăng nhập lại Apple Developer, bỏ qua session cache
--refresh-profileTạo lại Provisioning Profile (khi thay đổi Capabilities)
--auto-submitTự động submit IPA lên TestFlight sau khi build xong

Build Status

Xem trạng thái của một build job theo Job ID.

Terminal — ant status
$ ant status abc123xyz
Job ID: abc123xyz
Status: SUCCESS
Created: 4/27/2026, 10:30:00 AM
Updated: 4/27/2026, 10:45:12 AM
IPA: https://storage.googleapis.com/.../MyApp.ipa

Trạng thái

PENDINGĐang chờ build server nhận job
RUNNINGBuild server đang xử lý
SUCCESSBuild thành công, IPA đã sẵn sàng
FAILEDBuild thất bại, xem logs để biết chi tiết

Add device

Chỉ áp dụng cho iOS

Android không cần đăng ký device — file .apk có thể cài trực tiếp trên bất kỳ thiết bị nào. iOS thì khác: Apple bắt buộc mọi thiết bị chạy app ngoài App Store phải được đăng ký UDID trước trong Apple Developer Portal.

Khi build với distribution: internal, iOS app được ký bằng Development / Ad Hoc Provisioning Profile. Profile này chứa danh sách UDID các thiết bị được phép cài. Nếu UDID của thiết bị không có trong profile, iOS sẽ từ chối cài app.

Terminal — device enrollment
$ ant build --platform ios --profile development
...
📱 Device enrollment
iPhone will send UDID after scanning QR below
Scan QR with iPhone Camera:
▄▄▄▄▄▄▄ ▄ ▄▄ ▄▄▄▄▄▄▄
█ ▄▄▄ █ ▀▄▄▀▄ █ ▄▄▄ █
█ ███ █ ██▀▀█ █ ███ █
▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀
Or open: https://antgo.work/enroll/xxxxxxxx
Waiting for iPhone...
✔ Device confirmed: iPhone 15 Pro (00008110-001234ABCDEF)
? Device name: My iPhone
✔ Device registered: My iPhone

Quy trình

1

CLI gọi server tạo enrollment session — sinh URL + token.

2

CLI hiển thị QR code. Quét bằng Camera app (không cần app riêng).

3

iPhone tải .mobileconfig → nhắc cài profile → gửi UDID về server.

4

CLI nhận UDID, kiểm tra và đăng ký device trên Apple Developer Portal.

5

Tiếp tục build với Provisioning Profile đã bao gồm device mới.

Nếu UDID đã được đăng ký trước đó trên Apple Developer Portal, bước đăng ký device sẽ bị bỏ qua.

Build Profiles

File cấu hình build profiles đặt ở root của project. Nếu chưa có, ant build sẽ tự tạo với các profile mặc định.

ant.json
{
"build": {
"production": {
"distribution": "store"
},
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
}
}
}
productionstore

Submit lên App Store hoặc phân phối qua TestFlight.

  • 🔑 Distribution Certificate
  • 📋 App Store Provisioning Profile
  • ✗ Không cần add device
Dùng khi release chính thức hoặc gửi beta qua TestFlight
developmentinternal

Cài trực tiếp lên thiết bị để debug và develop. Hỗ trợ kết nối Metro bundler.

  • 🔑 Development Certificate
  • 📋 Development Provisioning Profile
  • ⚠ Cần add device (UDID)
Dùng trong quá trình phát triển, cần debug trên thiết bị thật
previewinternal

Chia sẻ bản test với QA / stakeholders mà không cần qua App Store.

  • 🔑 Distribution Certificate (Ad Hoc)
  • 📋 Ad Hoc Provisioning Profile
  • ⚠ Cần add device (UDID)
Dùng khi cần share bản test nội bộ trước khi lên store

Profile fields

distribution"store" → App Store/TestFlight · "internal" → cài thẳng lên device
developmentClienttrue → build Expo development client, hỗ trợ kết nối Metro bundler

Login

Đăng nhập vào tài khoản ant-go để dùng các lệnh như build. Token được lưu tại ~/.ant-go/config.json và có hiệu lực trong 24 giờ.

Đăng nhập bằng email và mật khẩu:

Terminal — ant auth login
$ ant auth login
? Email: dev@example.com
? Password: ••••••••
✔ Logged in!
Name: Nguyen Van A
Email: dev@example.com
Plan: Pro
Builds: 47 / unlimited

Hoặc đăng nhập qua Google bằng trình duyệt:

Terminal — browser login
$ ant auth login --browser
Opening browser...
https://antgo.work/auth/cli?port=9005&state=xxxxxxxx
Waiting for browser confirmation...
✔ Logged in!
Hi, Nguyen Van A

Options

--browserĐăng nhập qua Google OAuth bằng trình duyệt thay vì email/password

Logout

Đăng xuất khỏi tài khoản ant-go. Token hiện tại sẽ bị thu hồi trên server và xoá khỏi máy.

Terminal — ant auth logout
$ ant auth logout
✔ Logged out.

Whoami

Xem thông tin tài khoản đang đăng nhập và trạng thái token hiện tại.

Terminal — ant auth whoami
$ ant auth whoami
Name: Nguyen Van A
Email: dev@example.com
Plan: free
Credits: 12/15
Expires: 2026-05-01 10:30:00

Nếu chưa đăng nhập, lệnh sẽ hiện thông báo và hướng dẫn chạy ant auth login.

Language

Đổi ngôn ngữ hiển thị của CLI. Hỗ trợ tiếng Việt (vi) và tiếng Anh (en).

Terminal — ant set lang
$ ant set lang vi
✔ Language set to: vi
Terminal — switch to English
$ ant set lang en
✔ Language set to: en

Giá trị hợp lệ

viTiếng Việt (mặc định)
enEnglish

ant-go CLI v0.1.0 · Build automation service

Mở Console →