{"id":13764816,"url":"https://github.com/tdeckers/sparkcli","last_synced_at":"2026-01-27T03:16:19.220Z","repository":{"id":142616753,"uuid":"55501828","full_name":"tdeckers/sparkcli","owner":"tdeckers","description":"A command line interface to Cisco Spark","archived":false,"fork":false,"pushed_at":"2017-05-09T15:56:22.000Z","size":45,"stargazers_count":14,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T01:32:27.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tdeckers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-04-05T11:20:03.000Z","updated_at":"2024-01-05T01:50:19.000Z","dependencies_parsed_at":"2024-01-30T07:00:17.023Z","dependency_job_id":"74db3b27-7344-42d4-bb3f-bf345676828d","html_url":"https://github.com/tdeckers/sparkcli","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdeckers%2Fsparkcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdeckers%2Fsparkcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdeckers%2Fsparkcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdeckers%2Fsparkcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdeckers","download_url":"https://codeload.github.com/tdeckers/sparkcli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253480403,"owners_count":21915246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:00:29.575Z","updated_at":"2026-01-27T03:16:19.196Z","avatar_url":"https://github.com/tdeckers.png","language":"Go","funding_links":[],"categories":["Developer Tools"],"sub_categories":["Web SDK \u0026 Widgets samples"],"readme":"[![Build Status](https://travis-ci.org/tdeckers/sparkcli.svg?branch=master)](https://travis-ci.org/tdeckers/sparkcli) [ ![Download](https://api.bintray.com/packages/tdeckers/sparkcli/sparkcli/images/download.svg) ](https://bintray.com/tdeckers/sparkcli/sparkcli/_latestVersion)\n\n# Overview\n\n`sparkcli` (say 'sparkly' :) is a command line interface to Cisco Spark.\n\n# Setup - Configuration\n\nThere are two ways to provide `sparkcli` with credentials:\n\n* [OAuth integration](https://developer.ciscospark.com/authentication.html)\n* [Bot account](https://developer.ciscospark.com/bots.html)\n\nUsing a bot account is the simplest to setup.  Check the [Cisco Spark docs](https://developer.ciscospark.com/bots.html) for more details on the difference between the two.\nBoth mechanisms are explained, when in doubt or unsure, go for the Bot account option.\n\n## Option 1: Use a bot account\n\n**1. Obtain a Cisco Spark bot account token**\n\nDefine a new Cisco Spark bot account here: [https://developer.ciscospark.com](https://developer.ciscospark.com/apps.html).  Make sure to select the Bot option on this page.  Fill in the fields as desired.  For app icon, feel free to use `http://files.ducbase.com/spark.png`\n\n**2. Configure**\n\nCreate a configuration file called `sparkcli.toml`.  This file is in \n[toml format](https://godoc.org/github.com/BurntSushi/toml).  Sparkcli will look for the \nfile in these locations (in order):\n\n* current working directory\n* `/etc/sparkcli`\n* users' home directory\n\nAdd the `AccessToken` to the file:\n\n    # cat /etc/sparkcli/sparkcli.toml\n    AccessToken = \"NzIxMzZkMzYtODQ22S00YqFkLWIzNjUtYTg2NWZmYmEz12d5MzJmM2NhZDYtMWM1\"\n\nAnd you're done!  Skip down to the usage section for more.\n\n## Option 2: Use OAuth integration\n\n**1. Obtain a Cisco Spark developer API key and secret**\n\nDefine a new Cisco Spark integration app here: [https://developer.ciscospark.com](https://developer.ciscospark.com/apps.html).  Make sure to select the Integration option.  Fill in the fields as desired, with the exception of:\n   \n* App icon: Feel free to use `http://files.ducbase.com/spark.png` or use your own.\n* Redirect Url: `http://files.ducbase.com/code.html`.\n* Scopes: check all boxes.\n\nYou'll be provided with a `ClientID` and `ClientSecret`.  You'll need these for the \n   next step.\n\nNext navigate to the 'OAuth Authorization URL' to obtain an `AuthCode`.\n\n**2. Configure**\n\nCreate a configuration file called `sparkcli.toml`.  This file is in \n[toml format](https://godoc.org/github.com/BurntSushi/toml).  Sparkcli will look for the \nfile in these locations (in order):\n\n* current working directory\n* `/etc/sparkcli`\n* users' home directory\n\nAdd the `ClientID`, `ClientSecret` and the `AuthCode` from the previous steps in the file:\n\n    # cat ./sparkcli.toml\n    ClientId = \"C23d70022b9e6c4b348897daac846xf694e7f8ffa3cd38986c6974433def69784\"\n    ClientSecret = \"dcca20a5b5cc89fbea1f2b3cd41x80248ff698277583bce69fa63923ef02dc64\"\n    AuthCode = \"46cd20fe32936af96ecb385772896ff84208x14dc3b2f1aebf98cc5b5a02accd\"\n\n**3. Login**\n\nDownload a copy of sparkcli:  [ ![Download](https://api.bintray.com/packages/tdeckers/sparkcli/sparkcli/images/download.svg) ](https://bintray.com/tdeckers/sparkcli/sparkcli/_latestVersion).\nThen run\n\n    sparkcli login\n\nThis will update your configuration file with the neccesary tokens for Sparkcli\nto authenticate against the Cisco Spark service.  If you use SparkCli frequent enough \n(once every 90 or so days at least), tokens will be refreshed and kept up to date \nas needed.\n\n_**Note**: If Sparkcli gets confused and can't login for some reason, likely the easiest solution is\nto remove followling fields - AuthCode, AccessToken, RefreshToken - from sparkcli.toml \nand restart from step 2 above._\n\n# Usage\n\nYou'll notice that most commands have a short hand script which is listed below \nthe long version\n\n## Global arguments\n\n    sparkcli -h\n\n\u003e Get help\n\n    sparkcli -j=false ...\n\n\u003e Formats the results (if any) in a human readable format.  If this options is \n\u003e set to true or not present the return value(s) as JSON.\n\n## Rooms\n\nList all rooms\n\n    sparkcli rooms list\n    sparkcli r l\n\n\u003e Lists all rooms you're subscribed too.\n\nCreate room\n\n    sparkcli rooms create \u003cname\u003e\n    sparkcli r c \u003cname\u003e\n\n\u003e Creates a room with the name specified.  The room name can include multiple words. \n\u003e If -j=false, only the room id is printed so it can be assigned to a variable.\n\nGet a specific room\n\n    sparkcli rooms get \u003cid\u003e\n    sparkcli r g \u003cid\u003e\n    \n    # using the default room\n    sparkcli r g\n\n\u003e Gets details for the room.  If no id is provided, this command uses the default \n\u003e room id if one is available in the config.  See how to set a default room in \n\u003e the config later.\n\nDelete a room\n\n    sparkcli rooms delete \u003cid\u003e\n    sparkcli r d \u003cid\u003e\n\n\u003e Deletes the room.\n\nSet the default room\n\n    sparkcli rooms default \u003cid\u003e\n    \n    # no short for default!\n    sparkcli r default \u003cid\u003e \n\n\u003e Saves a default room id to the config for use in other operations that support it.\n\u003e This won't check if the room actually exists. If no id is provided, this will \n\u003e just diplay the saved room id.\n\n## Messages\n\nList messages\n\n    sparkcli messages list \u003croomid\u003e\n    sparkcli m l \u003croomid\u003e\n    \n    # to use the default room\n    sparkcli m l\n\n\u003e List the messages for a given room.  If no room id is provided, the default room\n\u003e will be used if one exists.\n\nCreate message\n\n    sparkcli messages create \u003croomid\u003e \u003cmsg\u003e\n    sparkcli m c \u003croomid\u003e \u003cmsg\u003e\n    \n    # to post in the default room\n    sparkcli m c - \u003cmsg\u003e\n    \n\u003e Creates a message is the specified room.  For posting to the default room, use\n\u003e a dash (-).\n\nGet a message\n\n    sparkcli messages get \u003cid\u003e\n    sparkcli m g \u003cid\u003e\n    \n\u003e Gets a messages' details.\n\nDelete a message\n\n    sparkcli messages delete \u003cid\u003e\n    sparkcli m d \u003cid\u003e\n\n\u003e Deletes a messages.\n\n## People\n\nGet people details\n\n    sparkcli people get \u003cid\u003e\n    sparkcli p g \u003cid\u003e\n    \n    # get your details\n    sparkcli people get\n    sparkcli people get me\n\n\u003e Gets people details.  If no id is provided, or if _me_ is provided, then your\n\u003e own account details are returned.\n\nList people\n\n    sparkcli people list -email \u003cemail\u003e -name \u003cname\u003e\n    sparkcli p l -e \u003cemail\u003e -n \u003cname\u003e\n\n\u003e List people that match email or name (startsWith). You must provide one of the\n\u003e two options.\n\n# Membership\n\nList memberships\n\n    sparkcli memberships list -room \u003croom id\u003e -personid \u003cperson id\u003e -email \u003cemail\u003e\n    sparkcli m l -r \u003croom id\u003e -p \u003cperson id\u003e -e \u003cemail\u003e\n    \n    # list rooms you're subscribed to (no params needed)\n    sparkcli membership list\n    \n    # list members of a room\n    sparkcli membership list -r \u003croom id\u003e\n    \n    # list members of the default room (from config)\n    sparkcli membership list -r -\n    \n    # Check membership for a person in a room\n    sparkcli membership list -r \u003croom id\u003e -email \u003cemail\u003e\n    sparkcli membership list -r \u003croom id\u003e -p \u003cperson id\u003e\n\n\u003e List membership information. See examples for usage details.\n\nCreate a membership\n\n    sparkcli memberships create -room \u003croom id\u003e -personid \u003cperson id\u003e -email \u003cemail\u003e\n    sparkcli m c -r \u003croom id\u003e -p \u003cperson id\u003e -e \u003cemail\u003e\n    \n    # Create membership for the default room\n    sparkcli membership create -r - -e \u003cemail\u003e\n\n\u003e Create a membership for the person (specify either id or email) to the room\n\nGet membership details\n\n    sparkcli memberships get \u003cid\u003e\n\n\u003e Returns details for the membership.\n\nUpdate membership\n\n    sparkcli memberships update -moderator=true|false \u003cid\u003e\n    sparkcli m u -m=true|false \u003cid\u003e\n\n\u003e Update membership. At this point only the moderator value of a membership can\n\u003e be updated.\n\nDelete membership\n\n    sparkcli memberships delete \u003cid\u003e\n    sparkcli m d \u003cid\u003e\n\n\u003e Delete membership.\n\n## Other\n\nLogin\n\n    sparkcli login\n\n\u003e Logs you into the Cisco Spark service, and stores access tokens on success.\n\n# Development\n\nSee [Development](DEVELOPMENT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdeckers%2Fsparkcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdeckers%2Fsparkcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdeckers%2Fsparkcli/lists"}