{"id":19484968,"url":"https://github.com/opencog/atomspace-typescript","last_synced_at":"2026-05-15T06:41:42.879Z","repository":{"id":73478318,"uuid":"567524605","full_name":"opencog/atomspace-typescript","owner":"opencog","description":"Typescript (javascript) API into the AtomSpace","archived":false,"fork":false,"pushed_at":"2022-12-14T03:08:05.000Z","size":955,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-08T07:46:04.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/opencog.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,"publiccode":null,"codemeta":null}},"created_at":"2022-11-18T01:08:46.000Z","updated_at":"2023-01-11T17:45:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"930ac686-b780-4c41-8287-cc49cc4aa15d","html_url":"https://github.com/opencog/atomspace-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencog%2Fatomspace-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencog%2Fatomspace-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencog%2Fatomspace-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencog%2Fatomspace-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencog","download_url":"https://codeload.github.com/opencog/atomspace-typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240721797,"owners_count":19847002,"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-11-10T20:24:56.181Z","updated_at":"2026-05-15T06:41:37.855Z","avatar_url":"https://github.com/opencog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AtomSpace TypeScript API and Browser viewer.\nThis project offers two components:\n* A way to interact with an OpenCog\n  [AtomSpace](https://github.com/opencog/atomspace)\n  using JavaScript/TypeScript.\n* A minimal proof-of-concept AtomSpace viewer app.\n\nThis project was bootstrapped with\n[Create React App](https://github.com/facebook/create-react-app).\n\n## Tech overview\nThe API talks to the AtomSpace through the\n[CogServer](https://github.com/opencog/cogserver), via a WebSockets\nsocket.  It talks to the JSON shell provided by the CogServer.  The\nCogServer also provides Scheme and Python shells, but the JSON shell\nmight be easiest for most web programmers.\n\nThe AtomSpace viewer is a React app. It should probably be combined\nwith the\n[AtomSpace Explorer](https://github.com/opencog/atomspace-explorer).\nThe problem here is that the AtomSpace Explorer uses an obsolete API\nto the AtomSpace: it should be replaced with the API here.\n\n## Running\n\n### Prerequisites\nFirst, install `npm`. Then\n```\nnpm install react-scripts\n```\n\n### Start the CogServer\nLike so:\n```\n$ guile\n\u003e (use-modules (opencog) (opencog cogserver))\n\u003e (start-cogserver)\n```\n\nVerify that the cogserver is running: use a browser and open the default\nURL [http://localhost:18080](http://localhost:18080) to view the\nCogServer status page.\n\n### Configure typescript\nEdit `src/services/OpenCogAPI.ts` and verify that the URL reflects where\nyour CogServer JSON shell actually is. The default location is\n`ws://localhost:18080/json`. If you are running the CogServer in a\ncontainer, you will need to change the address from `localhost` to the\ncontainer addr.\n\n### Run this app\nRun `npm start` from this directory (the project directory). This runs\nthe app in the development mode.  Open\n[http://localhost:3000](http://localhost:3000) to view it in the\nbrowser.  The page will reload if you make edits to project files.\nYou will also see lint errors in the console.\n\n### Verify operation\nCreate some Atoms in the browser. Verify that they have appeared in the\nAtomSpace. This can be done at the `guile` prompt:\n```\nguile\u003e (cog-prt-atomspace)\n... stuff should print...\nguile\u003e (cog-report-counts)\n... summary report ...\n```\n\nCreate some Atoms in the AtomSpace:\n```\nguile\u003e (Evaluation (Predicate \"mars\") (List (Concept \"martian\") (Concept \"rock\")))\n```\nPull them into the browser by clicking on \"Get Atoms\".\n\n### Network Debug\nIf the app is connected to the CogServer, then it will appear in the\nCogServer Status page. Just reload\n[http://localhost:18080](http://localhost:18080) and look for a line\nmarked `json`.\n\n## Other Available Scripts\n\nIn the project directory, you can run:\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\nIt correctly bundles React in production mode and optimizes\nthe build for the best performance.\n\nThe build is minified and the filenames include the hashes.\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencog%2Fatomspace-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencog%2Fatomspace-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencog%2Fatomspace-typescript/lists"}