Zettelkasten Forum


Cosma - visualization for plain text files

Hi everyone, I stumbled upon ‚Cosma‘ today and wanted to share it with you here:

Cosmo is a visualization tool for knowledge workers. It reads plain text files containing [[wiki links]] and renders them as an interactive network of index cards.

https://cosma.arthurperret.fr/index.html

Comments

  • @Marcus
    I'm giving Cosma a go and find your "Getting Started" to be well-written and helpful. I've successfully launched my first cosmascope. I'd love to apply this to more of my zettelkasten. I use The Archive and have 4443 notes. The YAML front matter syntax differs from that used in the standard cosma config.yml. I'm wondering whether there are any plans to add support for custom YAML front matter syntax, or if I should consider writing a custom Python script to convert all my notes. Notice how the internal links in The Archive are formatted and "links as search" not filenames or even whole note names, partial note names.

    Here is a sample note:

    ---
    UUID:      ›[[202206251631]] 
    cdate:     06-25-2022 04:31 PM
    tags:      #book #craftsmanship #ideation 
    ---
    # Techniques For Producing Ideas
    Subatomic: Book by James Webb Young
    
    - [[202205291111]]
    - Henri Poincare On How Creativity Works [[202106241737]]
    - Five Steps For A Creative Process [[202106241739]]
        - Which is the original of this idea and a processing of Maria Popova's Brain Pickings essay.
    - Optimizing Efficiency Of Skills [[202112270819]] 
    
    ISBN: 9780071426251
    
    - Ideas appear suddenly above the surface of the mind with an air of unaccountability. I didn't author them. 
    
    
    
      “Is an idea, too, like this? Is it only the final result of a long series of unseen idea- building processes which go on beneath the surface of the conscious mind?" [young:2003 16]
    
    
    - Shining A Light On Thinking With Writing [[202109291550]] 
    - Deep Think August 25, 2021 [[202108251012]] 
    
    The operative techniques of ideation can be learned.
    
    - Attention is life & Life is attention [[202206210725]] 
    
    
    
      and that its effective use is just as much a matter of practice in the technique as is the effective use of any tool. [young:2003 16]
    
    
    - Tools for thought: science, design, art, craftsmanship [[202201011020]] 
    - Expanded Idea Of Journaling [[202106281518]] 
    - Collection Of Tools For Thought [[202106271526]]
    - Do Ten Times as Much [[202412040756]]
        - Doing more practice than everyone else is the way to get better than everyone else.
    
    
    - A speculator is a person who is preoccupied with the possibilities of new combinations of ideas. A very large group.
    
    - A stockholder are people who are "the routine, steady-going, unimaginative, conserving people, whom the speculator manipulates." [young:2003 18]
    
    ## Principles
    1. Combine elements of old ideas seeing the relationships. "nothing more nor less than a new combination of old elements." [young:2003 21]
    
        - Using the file [[201901211151]]
            - Developing young zettel [[202106040552]]
    - Skeuomorphism [[202105021513]]
    
    2. Making new combinations is made possible by seeing relationships.
    
        - The Act of Note Making [[202203181940]] 
    
    ## Methods
    - Develop a habit of mind for searching relationships between fact and ideas. [young:2003 21]
    
    - Methods for Producing Ideas [[202306130804]]
    
    Exposed ideas born of this serendipity to scrutiny by the trusted. "You will find that a good idea has, as it were, self-expanding qualities. It stimulates those who see it to add to it. Thus possibilities in it which you have overlooked will come to light." [young:2003 33]
    
    Words matter.
    Words are proxies for ideas. 
    To master words is to master ideas.
    "Thus, words being symbols for ideas, we can collect ideas by collecting words." [young:2003 37]
    
    ————
    ## References and Resources
    - A Technique for Producing Ideas by Young, James Webb, 2003.
    
    

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

  • Hi @Will , I'm afraid I have to disappoint you—I didn't create the tool. I found Cosma on a blog about Zettelkasten without even looking for it, and even before I tried it out myself, I was so impressed by the website that I didn't want to keep it from our community.

    I'm curious to see what you'll do with the tool and what other users' experiences with it will be. Unfortunately, I don't have much time right now.

  • Here is my first attempt at making a cosmascope. I had to fiddle with the YAML front matter a bit to get it to work.

    @ctietze — This is something I'd have an Agent do after filtering notes based on a query with ta. Am I thinking right?

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

  • @Will that's a cool idea, I need to explore this and whether that works with Cosma

    Author at Zettelkasten.de • https://christiantietze.de/

  • @Marcus said:

    Hi @Will , I'm afraid I have to disappoint you—I didn't create the tool. I found Cosma on a blog about Zettelkasten without even looking for it, and even before I tried it out myself, I was so impressed by the website that I didn't want to keep it from our community.

    The blog and software is by Arthur Perret, an information and communication sciences professor in Lyon, France. I remember seeing the software back in 2022 (the first release was in 2021) when I mentioned one of his blog posts in a discussion here.

    Many of Arthur's blog posts (some in French) are interesting, for example:

  • edited May 28

    @Andy said:

    The post contains another point I completely agree with (emphasis added):

    What’s strange, is that the underlying principles of interrelated note-taking tools should be familiar to us. It’s hypertext, which we see everytime we browse the Web.

    Cosma's visualization stands in a long tradition. The earliest working demo I know was Doug Engelbart's Mother of all demos in 1968. You can see it in the following video at 16:05min:

    There have been countless comparable experiments since then. But for some reason none of them really took off.

    Cosma looks very elegant and state of art with its focus on open standards and a stand-alone output.

  • @Andy said:
    @Marcus said:

    Hi @Will , I'm afraid I have to disappoint you—I didn't create the tool. I found Cosma on a blog about Zettelkasten without even looking for it, and even before I tried it out myself, I was so impressed by the website that I didn't want to keep it from our community.

    The blog and software is by Arthur Perret, an information and communication sciences professor in Lyon, France. I remember seeing the software back in 2022 (the first release was in 2021) when I mentioned one of his blog posts in a discussion here.

    Many of Arthur's blog posts (some in French) are interesting, for example:
    [snip]

    Thanks very much for these links. I agree with most of what Perret says in them. I would like to point out that a tree-like view is one kind of graph view, and in turn they are particular views or projections of the collection of cards. There can be many others, and most likely there are other useful kinds waiting to be devised.

  • edited June 10

    @Will or anyone else who has tried Cosma...

    I've been fiddling around with Cosma for the last few days and managed to make some progress. I had to write a Python script to change the organization of the YAML information at the beginning of my notes - namely, I didn't have any, so I inserted simple text of the following form, derived from the note file's name:

    I then followed the instructions in the previously provided links about Cosma, to create a configuration file and set up folders in the "local project" mode.

    So far, so good. The first few attempts at running "Cosma Modelize" revealed a couple of errors in the configuration file. Now, everything seems to be working, up to a point. However, the program aborts without actually producing a "cosmoscope" and without producing any error logs. Instead, I get the following error message (in the Apple terminal app):

    [Cosma v.2.6.1]
    Building cosmoscope… (source type: directory)
    Err. (unknown path) [Line 231, Column 29]
    TypeError: The "path" argument must be of type string. Received undefined

    Does this make sense to anyone? I presume the reference to line and column numbers is to the Cosma code itself, which I don't have access to.

    If no one here can interpret this error message for me, I'll try tracking down the Cosma developer(s).

    Post edited by GeoEng51 on
  • Here is my first successful cosmascope.

    CleanShot 2026-06-10 at 16.59.23.png

    I remember getting this error, and I changed the config.yml file, and it worked.

    select_origin: directory
    files_origin: ./data
    nodes_origin: null
    links_origin: null
    nodes_online: null
    links_online: null
    images_origin: null
    export_target: ./export/
    history: true
    focus_max: 2
    ...
    

    I put my test zettels in the data folder. They were collected from a "ta" query.

    ./ta search thinking --depth 2
    

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

  • @Will said:

    I remember getting this error, and I changed the config.yml file, and it worked.

    select_origin: directory
    files_origin: ./data
    nodes_origin: null
    links_origin: null
    nodes_online: null
    links_online: null
    images_origin: null
    export_target: ./export/
    history: true
    focus_max: 2
    ...
    

    I put my test zettels in the data folder.

    Yes, that is exactly what I did, as well; the beginning of my config files looks the same as yours; the rest was as generated by cosma. I have a folder cosma-test, which contains the config.yml file, the data folder (with some test zettels) and then the cosma-generated folders "export" and "history".

    When I reran it with 300 zettels, I got the same error, and then with 100 zettels, the same error, and then finally with 7 zettels and it produced a cosmoscope of 7 dots, not connected (as those 7 zettels didn't happen to be connected).

    So, the error must be coming from one of the links in some zettel file?? I'll have to check if there is a specific format for the links.

  • A bolt of lightning struck!

    The problem I had was with the media links in one of the files. Once removed it worked great. I added it back in for testing, and this is my error.

    [Cosma v.2.6.1] A test of Cosma 
    Building cosmoscope… (source type: directory)
    Err. (unknown path) [Line 231, Column 29]
      TypeError: The "path" argument must be of type string. Received undefined
    

    By the way, the log files are in /Users/GeoEng51/Library/Logs/cosma-cli

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

  • @Will - yes, I think that might be my problem, but now to find where it occurs in so many zettel files :>(

    Thanks for the info!

  • edited June 11

    Try this command in the cosma data folder to remove the external links:

    find . -name '*.md' -type f -exec sed -i .bak '/!\[\](media\/[^)]*)/d' {} +

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

  • @Will said:
    Try this command in the cosma data folder to remove the external links:

    find . -name '*.md' -type f -exec sed -i .bak '/!\[\](media\/[^)]*)/d' {} +

    Hi Will - I'm not sure what that command does, but in Terminal, I changed to the Data directory and then ran that command. I didn't see any error messages; it took about 1 sec to execute.

    However, I still get the same error message when I run "cosma modelize".

    You say the problem is with the links to any media files? I could search through each file and remove any links to media files, using a Python script. I'll have a look at that, unless you have a different/better idea.

    Thanks for the help on this, by the way.

    Here's what one zettel that contains a link to an image looks like:

    ---
    title: 202006101430 Stopping Time
    id: 202006101430
    ---
    # 202006101430 Stopping Time

    tags:: #StoryIdeas #StoppingTime #Image

    - This comic showed up in my “daily dose” of comics. It immediately struck me as being relevant to my time deconstruction discussion, so I’ve included it here for future inspiration:
    - Calvin: Dad, look! The sun is setting and it's only 3 o'clock!
    - Dad: It's not 3 o'clock. Your watch stopped.
    - Calvin: Time doesn't stop if your watch stops?
    - Dad: Nope
    - Calvin: Phooey. For a moment there, I thought I'd get rich patenting this thing.
    - Dad: I'd have bought one.
    - ![image](202006101430%20Stopping%20Time_attachments/Calvin_Time_Stops.jpg)

    ---
    - internal links:
    - [[202006101436 Time Deconstruction]]

    I'm using NotePlan for my ZK; it puts any image files into a subdirectory with the same name as the note in which it is referenced. I've already removed all of those sub-directories with image files.

  • The command will remove the external links to files in the underlying "media" folder. "Media" is The Archive's protocol. Switch the command to look for "image" references.

    This will remove all image references that cosma is complaining about due to a path error. If there are other references besides images, you may need to adjust the command accordingly.

    This creates a backup copy of the original file before making the changes.

    find . -name '*.md' -type f -exec sed -i .bak '/^- !\[image\]([^)]*)$/d' {} +

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

  • edited June 12

    @Will That is a very powerful command - thank you!! I can see what it is doing - selectively removing lines within the zettel files and providing the back-up files as well. Impressive!

    Is this Apple script or what language is it using? I need to educate myself on that.

    However, I'm still getting the same error message, which must mean there are other external references or strings of information that Cosma doesn't like. Do you think that would include references to web pages?

    Hopefully I'll get Cosma to work. It doesn't seem like a very friendly or well-vetted program, though. I'm only guessing here, but I suspect it is at least:

    1. Reading each file, line by line, looking first for the metadata that provides the title and id of the zettel
    2. Then, looking for any links to other zettels in the current file/note

    My problem might be that in NotePlan, links are to the full title of each file, rather than just the UID, as in The Archive. So, one of my links might look like:

    [[202203212216 Experience versus Opinion]]

    and that link has several spaces, which might confuse Cosma. This is just speculation, but I might have to contact the Cosma developers somehow, to confirm.

    Post edited by GeoEng51 on
  • edited June 12

    It's not that Cosma doesn't like the links; it's that it can't find them. It looks for paths relative to the data folder in your setup and can't find them. Try removing all but 10 files from the data folder and see what happens.

    No, properly formatted web links do not cause issues. Cosma does not have a problem with them. You can find them on the internet.

    Not having access to all the included files is a problem associated with using existing files for testing.

    The script is an old-school UNIX sed command. The Bell Labs developed sed around 1974. I became aware of it in the 1990s. It is a Bash command related to grep. sed stands for stream editor.

    Will Simpson
    My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    My Internet HomeMy Now Page

Sign In or Register to comment.