https://github.com/supabase/fly-admin
A typescript client for managing Fly.io Machines
https://github.com/supabase/fly-admin
Last synced: 10 months ago
JSON representation
A typescript client for managing Fly.io Machines
- Host: GitHub
- URL: https://github.com/supabase/fly-admin
- Owner: supabase
- License: mit
- Fork: true (supabase/fly-preview)
- Created: 2023-05-12T22:25:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T17:25:22.000Z (over 2 years ago)
- Last Synced: 2024-10-29T12:34:01.703Z (almost 2 years ago)
- Language: TypeScript
- Size: 1.12 MB
- Stars: 47
- Watchers: 3
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `fly-admin`
A Typescript client for managing Fly infrastructure.
## Install
```bash
npm i --save fly-admin
```
## Usage
```ts
import { createClient } from 'fly-admin'
const fly = createClient('FLY_API_TOKEN')
async function deployApp() {
const machine = await fly.Machine.createMachine({
app_name: 'myAppId',
image: 'supabase/postgres',
})
}
```
## API
**Apps**
- `fly.App.listApps()`
- `fly.App.getApp()`
- `fly.App.createApp()`
- `fly.App.deleteApp()`
**Machines**
- `fly.Machine.listMachines()`
- `fly.Machine.getMachine()`
- `fly.Machine.createMachine()`
- `fly.Machine.updateMachine()`
- `fly.Machine.startMachine()`
- `fly.Machine.stopMachine()`
- `fly.Machine.deleteMachine()`
- `fly.Machine.restartMachine()`
- `fly.Machine.signalMachine()`
- `fly.Machine.waitMachine()`
- `fly.Machine.cordonMachine()`
- `fly.Machine.uncordonMachine()`
- `fly.Machine.listEvents()`
- `fly.Machine.listVersions()`
- `fly.Machine.listProcesses()`
- `fly.Machine.getLease()`
- `fly.Machine.acquireLease()`
**Networks**
- `fly.Network.allocateIpAddress()`
- `fly.Network.releaseIpAddress()`
**Organizations**
- `fly.Organization.getOrganization()`
**Secrets**
- `fly.Secret.setSecrets()`
- `fly.Secret.unsetSecrets()`
**Volumes**
- `fly.Volume.listVolumes()`
- `fly.Volume.getVolume()`
- `fly.Volume.createVolume()`
- `fly.Volume.deleteVolume()`
- `fly.Volume.extendVolume()`
- `fly.Volume.listSnapshots()`
**TODO**
- [ ] `fly.Machine.execMachine()`
- [ ] `fly.Machine.releaseLease()`
- [ ] `fly.Machine.getMetadata()`
- [ ] `fly.Machine.updateMetadata()`
- [ ] `fly.Machine.deleteMetadata()`
## License
MIT